Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: chrome/browser/guest_view/web_view/web_view_guest.h

Issue 291483010: <webview>: Move name attribute to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@newwindow_refactor
Patch Set: Addressed John's comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/guest_view/web_view/web_view_guest.h
diff --git a/chrome/browser/guest_view/web_view/web_view_guest.h b/chrome/browser/guest_view/web_view/web_view_guest.h
index ee86f63b03ac6e950ad9540914f03f061d77a7ac..f7b6d2ba0a7ee606a241e1cb30202a32031a3d32 100644
--- a/chrome/browser/guest_view/web_view/web_view_guest.h
+++ b/chrome/browser/guest_view/web_view/web_view_guest.h
@@ -63,6 +63,9 @@ class WebViewGuest : public GuestView<WebViewGuest>,
// |items| == NULL means no filtering will be applied.
void ShowContextMenu(int request_id, const MenuItemVector* items);
+ // Sets the frame name of the guest.
+ void SetName(const std::string& name);
+
// GuestViewBase implementation.
virtual void Attach(content::WebContents* embedder_web_contents,
const base::DictionaryValue& args) OVERRIDE;
@@ -291,8 +294,15 @@ class WebViewGuest : public GuestView<WebViewGuest>,
content::RenderViewHost* render_view_host) OVERRIDE;
virtual void DidStopLoading(
content::RenderViewHost* render_view_host) OVERRIDE;
+ virtual bool OnMessageReceived(
+ const IPC::Message& message,
+ content::RenderFrameHost* render_frame_host) OVERRIDE;
virtual void WebContentsDestroyed() OVERRIDE;
virtual void UserAgentOverrideSet(const std::string& user_agent) OVERRIDE;
+ virtual void RenderViewReady() OVERRIDE;
+
+ // Informs the embedder of a frame name change.
+ void ReportFrameNameChange(const std::string& name);
// Called after the load handler is called in the guest's main frame.
void LoadHandlerCalled();
@@ -343,6 +353,7 @@ class WebViewGuest : public GuestView<WebViewGuest>,
const GURL& url,
const std::string& error_type);
+ void OnUpdateFrameName(bool is_top_level, const std::string& name);
// Creates a new guest window owned by this WebViewGuest.
WebViewGuest* CreateNewGuestWindow(const content::OpenURLParams& params);
@@ -382,6 +393,9 @@ class WebViewGuest : public GuestView<WebViewGuest>,
// Stores the current zoom factor.
double current_zoom_factor_;
+ // Stores the window name of the main frame of the guest.
+ std::string name_;
+
// Handles find requests and replies for the webview find API.
WebviewFindHelper find_helper_;
« no previous file with comments | « chrome/browser/guest_view/web_view/web_view_constants.cc ('k') | chrome/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698