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

Unified Diff: content/browser/host_zoom_map_impl.h

Issue 809223006: Check temporary zoom status when sending zoom level in navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revise as per comments. Created 5 years, 10 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/browser/host_zoom_map_impl.h
diff --git a/content/browser/host_zoom_map_impl.h b/content/browser/host_zoom_map_impl.h
index f9002872e7c624a5fec63241d63fe1900e19fcc0..6248daf51c2b53408402d77fb66ee2e4f8638d84 100644
--- a/content/browser/host_zoom_map_impl.h
+++ b/content/browser/host_zoom_map_impl.h
@@ -79,6 +79,14 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap),
double GetTemporaryZoomLevel(int render_process_id,
int render_view_id) const;
+ // Returns the zoom level regardless of whether it's temporary, host-keyed or
+ // scheme+host-keyed.
+ //
+ // This may be called on any thread.
+ double GetZoomLevelForView(const GURL& url,
+ int render_process_id,
+ int render_view_id) const;
+
// NotificationObserver implementation.
void Observe(int type,
const NotificationSource& source,
@@ -105,8 +113,16 @@ class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap),
typedef std::map<RenderViewKey, double> TemporaryZoomLevels;
+ // Non-locked version for internal use. This should only be called within
+ // a scope where a lock has been acquired.
+ double GetZoomLevelForHostAndSchemeInternal(const std::string& scheme,
Charlie Reis 2015/02/11 20:56:34 nit: This should be declared in the same order in
wjmaclean 2015/02/12 15:59:36 Done.
+ const std::string& host) const;
double GetZoomLevelForHost(const std::string& host) const;
Charlie Reis 2015/02/11 20:56:34 nit: Put a blank line before this to clarify that
wjmaclean 2015/02/12 15:59:36 Done.
+ // Non-locked version for internal use. This should only be called within
+ // a scope where a lock has been acquired.
+ double GetZoomLevelForHostInternal(const std::string& host) const;
+
// Notifies the renderers from this browser context to change the zoom level
// for the specified host and scheme.
// TODO(wjmaclean) Should we use a GURL here? crbug.com/384486
« no previous file with comments | « no previous file | content/browser/host_zoom_map_impl.cc » ('j') | content/browser/loader/async_resource_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698