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

Unified Diff: content/public/browser/web_contents.h

Issue 224733018: Changes to content/ to facilitate new zoom extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 8 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: content/public/browser/web_contents.h
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index d84774fdcc36387d2c332fd439e548dec969559f..bb06b595af4eb3d3e12fc40e509e40ffd0d09324 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -18,6 +18,7 @@
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/save_page_type.h"
#include "content/public/browser/web_ui.h"
+#include "content/public/common/page_zoom.h"
#include "content/public/common/stop_find_action.h"
#include "ipc/ipc_sender.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -424,6 +425,10 @@ class WebContents : public PageNavigator,
virtual void SetClosedByUserGesture(bool value) = 0;
virtual bool GetClosedByUserGesture() const = 0;
+ // Gets the zoom mode for this WebContents, which determines the behavior of
+ // zoom changes.
+ virtual ZoomMode GetZoomMode() const = 0;
+
// Gets the zoom level for this tab.
virtual double GetZoomLevel() const = 0;
@@ -494,10 +499,18 @@ class WebContents : public PageNavigator,
// removed since we can then embed iframes in different processes.
virtual bool IsSubframe() const = 0;
+ // Sets the flag indicating whether zooming will have default behavior.
+ virtual void SetZoomMode(ZoomMode mode) = 0;
+
// Sets the zoom level for the current page and all BrowserPluginGuests
// within the page.
virtual void SetZoomLevel(double level) = 0;
+ // Optionally provide a callback function to be called after the zoom change
+ // has completed.
+ virtual void SetZoomLevel(double level,
+ const base::Callback<void(void)>& callback) = 0;
jam 2014/04/10 21:45:45 why exactly does the extensions api need this call
+
// Finds text on a page.
virtual void Find(int request_id,
const base::string16& search_text,

Powered by Google App Engine
This is Rietveld 408576698