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

Unified Diff: content/renderer/render_view_impl.h

Issue 1804023002: Fix page zoom to be frame-centric for out-of-process frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address alexmos@ comments Created 4 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/renderer/render_view_impl.h
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 8e5057e0e849a9b7a3da8eb9445fc045111c4879..80aa2af41cac24eed8c7b574d9fa60795d59d94a 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -32,6 +32,7 @@
#include "content/common/frame_message_enums.h"
#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
#include "content/common/navigation_gesture.h"
+#include "content/common/page_message_enums.h"
#include "content/common/view_message_enums.h"
#include "content/public/common/page_zoom.h"
#include "content/public/common/referrer.h"
@@ -236,6 +237,10 @@ class CONTENT_EXPORT RenderViewImpl
// as that is only for changes that aren't initiated by the client.
void SetZoomLevel(double zoom_level);
+ double page_zoom_level() {
+ return page_zoom_level_;
+ }
+
// Indicates whether this page has been focused by the browser.
bool has_focus() const { return has_focus_; }
@@ -667,7 +672,6 @@ class CONTENT_EXPORT RenderViewImpl
void OnSetRendererPrefs(const RendererPreferences& renderer_prefs);
void OnSetWebUIProperty(const std::string& name, const std::string& value);
void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level);
- void OnSetZoomLevelForView(bool uses_temporary_zoom_level, double level);
void OnSuppressDialogsUntilSwapOut();
void OnThemeChanged();
void OnUpdateTargetURLAck();
@@ -693,6 +697,8 @@ class CONTENT_EXPORT RenderViewImpl
// Page message handlers -----------------------------------------------------
void OnUpdateWindowScreenRect(gfx::Rect window_screen_rect);
+ void OnSetZoomLevelForView(PageMsg_SetZoomLevel_Command command,
+ double zoom_level);
// Adding a new message handler? Please add it in alphabetical order above
// and put it in the same position in the .cc file.
@@ -897,6 +903,10 @@ class CONTENT_EXPORT RenderViewImpl
bool has_scrolled_focused_editable_node_into_rect_;
gfx::Rect rect_for_scrolled_focused_editable_node_;
+ // Used to indicate the zoom level to be used during subframes loads, since
alexmos 2016/04/11 23:19:10 nit: s/subframes/subframe/
wjmaclean 2016/04/13 18:47:47 Done.
+ // they should match page zoom level.
+ double page_zoom_level_;
+
// Helper objects ------------------------------------------------------------
RenderFrameImpl* main_render_frame_;

Powered by Google App Engine
This is Rietveld 408576698