Commit fcef3e45 authored by Olivier Robin's avatar Olivier Robin Committed by Commit Bot

Make WebFramesManager::GetFrameWithId public accessible

Bug: 851636
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I21750fb7373063c60db26d8ba742e09d201dfe6e
Reviewed-on: https://chromium-review.googlesource.com/1184704
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Reviewed-by: default avatarMike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585459}
parent 1da47c69
......@@ -31,6 +31,11 @@ class WebFramesManager : public web::WebStateUserData<WebFramesManager> {
// NOTE: Due to the asynchronous nature of JavaScript to native messsaging,
// this object may be outdated.
virtual WebFrame* GetMainWebFrame() = 0;
// Returns the web frame with |frame_id|, if one exists.
// NOTE: Due to the asynchronous nature of JavaScript to native messsaging,
// this object may be outdated and the WebFrame returned by this method may
// not back a real frame in the web page.
virtual WebFrame* GetFrameWithId(const std::string& frame_id) = 0;
~WebFramesManager() override {}
......
......@@ -30,13 +30,10 @@ class WebFramesManagerImpl : public WebFramesManager {
// and keys of existing frames.
void RegisterExistingFrames();
// Returns the web frame with |frame_id|, if one exisits, from the list of
// associated web frames.
WebFrame* GetFrameWithId(const std::string& frame_id);
// WebFramesManager overrides
const std::vector<WebFrame*>& GetAllWebFrames() override;
WebFrame* GetMainWebFrame() override;
WebFrame* GetFrameWithId(const std::string& frame_id) override;
private:
friend class web::WebStateUserData<WebFramesManagerImpl>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment