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

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

Issue 954923005: Make command-zero reset page scale in addition to zoom level (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again again Created 5 years, 9 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 | « content/common/view_messages.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/host_zoom_map.h
diff --git a/content/public/browser/host_zoom_map.h b/content/public/browser/host_zoom_map.h
index 653d24882fe0c5532e15524bf44129373748f276..a4aca1d232f6a97423333490ad242b6d32e06842 100644
--- a/content/public/browser/host_zoom_map.h
+++ b/content/public/browser/host_zoom_map.h
@@ -37,11 +37,13 @@ class HostZoomMap {
public:
// Enum that indicates what was the scope of zoom level change.
enum ZoomLevelChangeMode {
- ZOOM_CHANGED_FOR_HOST, // Zoom level changed for host.
- ZOOM_CHANGED_FOR_SCHEME_AND_HOST, // Zoom level changed for scheme/host
- // pair.
- ZOOM_CHANGED_TEMPORARY_ZOOM, // Temporary zoom change for specific
- // renderer, no scheme/host is specified.
+ ZOOM_CHANGED_FOR_HOST, // Zoom level changed for host.
+ ZOOM_CHANGED_FOR_SCHEME_AND_HOST, // Zoom level changed for scheme/host
+ // pair.
+ ZOOM_CHANGED_TEMPORARY_ZOOM, // Temporary zoom change for specific
+ // renderer, no scheme/host is specified.
+ PAGE_SCALE_IS_ONE_CHANGED, // Page scale factor equal to one changed
+ // for a host.
};
// Structure used to notify about zoom changes. Host and/or scheme are empty
@@ -77,6 +79,10 @@ class HostZoomMap {
// temporary or host-specific.
CONTENT_EXPORT static double GetZoomLevel(const WebContents* web_contents);
+ // Returns true if the page scale factor for the WebContents is one.
+ CONTENT_EXPORT static bool PageScaleFactorIsOne(
+ const WebContents* web_contents);
+
// Sets the current zoom level for the specified WebContents. The level may
// be temporary or host-specific depending on the particular WebContents.
CONTENT_EXPORT static void SetZoomLevel(const WebContents* web_contents,
@@ -87,6 +93,12 @@ class HostZoomMap {
CONTENT_EXPORT static void SendErrorPageZoomLevelRefresh(
const WebContents* web_contents);
+ // Set or clear whether or not the page scale factor for a view is one.
+ virtual void SetPageScaleFactorIsOneForView(
+ int render_process_id, int render_view_id, bool is_one) = 0;
+ virtual void ClearPageScaleFactorIsOneForView(
+ int render_process_id, int render_view_id) = 0;
+
// Copy the zoom levels from the given map. Can only be called on the UI
// thread.
virtual void CopyFrom(HostZoomMap* copy) = 0;
« no previous file with comments | « content/common/view_messages.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698