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

Unified Diff: extensions/browser/guest_view/guest_view_base.h

Issue 787813004: Move ZoomController out of ChromeWebViewGuestDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build deps, address fsamuel@'s comments. Created 6 years 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: extensions/browser/guest_view/guest_view_base.h
diff --git a/extensions/browser/guest_view/guest_view_base.h b/extensions/browser/guest_view/guest_view_base.h
index 52e764803162c5ffc0a2aa47b270dfc84aa357db..d7f68125a0cffbcb08d7851a3a3380134a0df42d 100644
--- a/extensions/browser/guest_view/guest_view_base.h
+++ b/extensions/browser/guest_view/guest_view_base.h
@@ -9,6 +9,7 @@
#include "base/memory/weak_ptr.h"
#include "base/values.h"
+#include "components/ui/zoom/zoom_observer.h"
#include "content/public/browser/browser_plugin_guest_delegate.h"
#include "content/public/browser/render_process_host_observer.h"
#include "content/public/browser/web_contents.h"
@@ -28,7 +29,8 @@ namespace extensions {
// it is attached to a container within the owner's WebContents.
class GuestViewBase : public content::BrowserPluginGuestDelegate,
public content::WebContentsDelegate,
- public content::WebContentsObserver {
+ public content::WebContentsObserver,
+ public ui_zoom::ZoomObserver {
public:
class Event {
public:
@@ -249,6 +251,10 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
int browser_plugin_instance_id,
bool is_full_page_plugin) final;
+ // ui_zoom::ZoomObserver implementation.
+ void OnZoomChanged(
+ const ui_zoom::ZoomController::ZoomChangedEventData& data) override;
+
// Dispatches an event |event_name| to the embedder with the |event| fields.
void DispatchEventToEmbedder(Event* event);
@@ -270,6 +276,8 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
const WebContentsCreatedCallback& callback,
content::WebContents* guest_web_contents);
+ void OwnerWebContentsWillBeDestroyed();
+
static void RegisterGuestViewTypes();
// WebContentsObserver implementation.

Powered by Google App Engine
This is Rietveld 408576698