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

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

Issue 306003002: Move guest lifetime management to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed content_browsertests crash 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
« no previous file with comments | « chrome/browser/guest_view/guest_view_base.cc ('k') | chrome/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c88de6ccc7362c4f61f68a147c6fa914f3fb219d..a22ba01afa9446fd3a74bad3c031ffcf1abe63ee 100644
--- a/chrome/browser/guest_view/web_view/web_view_guest.h
+++ b/chrome/browser/guest_view/web_view/web_view_guest.h
@@ -16,7 +16,6 @@
#include "chrome/common/extensions/api/webview.h"
#include "content/public/browser/javascript_dialog_manager.h"
#include "content/public/browser/notification_registrar.h"
-#include "content/public/browser/web_contents_observer.h"
#include "third_party/WebKit/public/web/WebFindOptions.h"
#if defined(OS_CHROMEOS)
@@ -36,16 +35,14 @@ namespace ui {
class SimpleMenuModel;
} // namespace ui
-// A WebViewGuest is a WebContentsObserver on the guest WebContents of a
-// <webview> tag. It provides the browser-side implementation of the <webview>
-// API and manages the lifetime of <webview> extension events. WebViewGuest is
+// A WebViewGuest provides the browser-side implementation of the <webview> API
+// and manages the dispatch of <webview> extension events. WebViewGuest is
// created on attachment. That is, when a guest WebContents is associated with
// a particular embedder WebContents. This happens on either initial navigation
// or through the use of the New Window API, when a new window is attached to
// a particular <webview>.
class WebViewGuest : public GuestView<WebViewGuest>,
- public content::NotificationObserver,
- public content::WebContentsObserver {
+ public content::NotificationObserver {
public:
WebViewGuest(int guest_instance_id,
content::WebContents* guest_web_contents,
@@ -69,10 +66,7 @@ class WebViewGuest : public GuestView<WebViewGuest>,
// GuestViewBase implementation.
virtual void Attach(content::WebContents* embedder_web_contents,
const base::DictionaryValue& args) OVERRIDE;
-
- // BrowserPluginGuestDelegate public implementation.
- virtual bool HandleContextMenu(
- const content::ContextMenuParams& params) OVERRIDE;
+ virtual void EmbedderDestroyed() OVERRIDE;
// WebContentsDelegate implementation.
virtual bool AddMessageToConsole(content::WebContents* source,
@@ -89,6 +83,8 @@ class WebViewGuest : public GuestView<WebViewGuest>,
const gfx::Rect& selection_rect,
int active_match_ordinal,
bool final_update) OVERRIDE;
+ virtual bool HandleContextMenu(
+ const content::ContextMenuParams& params) OVERRIDE;
virtual void HandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) OVERRIDE;
@@ -126,9 +122,8 @@ class WebViewGuest : public GuestView<WebViewGuest>,
const GURL& target_url,
content::WebContents* new_contents) OVERRIDE;
- // GuestDelegate implementation.
+ // BrowserPluginGuestDelegate implementation.
virtual void DidAttach() OVERRIDE;
- virtual void EmbedderDestroyed() OVERRIDE;
virtual bool IsDragAndDropEnabled() OVERRIDE;
virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size)
OVERRIDE;
« no previous file with comments | « chrome/browser/guest_view/guest_view_base.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