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

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 attach logic in GuestViewBase::DidAttach(). 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..7b90343683da3f5c01db64b4af4ecc79a33c979c 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:
@@ -94,7 +96,7 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
// |owner_web_contents_| should still be valid during this call. This
// allows the derived class to perform some cleanup related to the embedder
// web contents.
- virtual void EmbedderWillBeDestroyed() {}
+ virtual void EmbedderWillBeDestroyed();
Fady Samuel 2014/12/09 20:09:46 This method is meant to be overriden by derived cl
wjmaclean 2014/12/09 20:50:04 Done.
// This method is called when the guest WebContents has been destroyed. This
// object will be destroyed after this call returns.
@@ -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);

Powered by Google App Engine
This is Rietveld 408576698