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

Side by Side Diff: content/public/browser/host_zoom_map.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: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_
6 #define CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ 6 #define CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // This should only be called on the UI thread. 130 // This should only be called on the UI thread.
131 virtual void SetZoomLevelForHostAndScheme(const std::string& scheme, 131 virtual void SetZoomLevelForHostAndScheme(const std::string& scheme,
132 const std::string& host, 132 const std::string& host,
133 double level) = 0; 133 double level) = 0;
134 134
135 // Returns whether the view manages its zoom level independently of other 135 // Returns whether the view manages its zoom level independently of other
136 // views displaying content from the same host. 136 // views displaying content from the same host.
137 virtual bool UsesTemporaryZoomLevel(int render_process_id, 137 virtual bool UsesTemporaryZoomLevel(int render_process_id,
138 int render_view_id) const = 0; 138 int render_view_id) const = 0;
139 139
140 // Returns the temporary zoom level that's only valid for the lifetime of
141 // the given WebContents (i.e. isn't saved and doesn't affect other
142 // WebContentses) if it exists, the default zoom level otherwise.
143 //
144 // This may be called on any thread.
145 virtual double GetTemporaryZoomLevel(int render_process_id,
Charlie Reis 2015/02/11 18:34:31 From the Content API guidelines: http://www.chromi
wjmaclean 2015/02/11 20:29:34 Done.
146 int render_view_id) const = 0;
Charlie Reis 2015/02/11 18:34:31 From the Content API guidelines: http://www.chromi
wjmaclean 2015/02/11 20:29:34 Done.
147
140 // Sets the temporary zoom level that's only valid for the lifetime of this 148 // Sets the temporary zoom level that's only valid for the lifetime of this
141 // WebContents. 149 // WebContents.
142 // 150 //
143 // This should only be called on the UI thread. 151 // This should only be called on the UI thread.
144 virtual void SetTemporaryZoomLevel(int render_process_id, 152 virtual void SetTemporaryZoomLevel(int render_process_id,
145 int render_view_id, 153 int render_view_id,
146 double level) = 0; 154 double level) = 0;
147 155
148 // Clears the temporary zoom level stored for this WebContents. 156 // Clears the temporary zoom level stored for this WebContents.
149 // 157 //
(...skipping 12 matching lines...) Expand all
162 virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback( 170 virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback(
163 const ZoomLevelChangedCallback& callback) = 0; 171 const ZoomLevelChangedCallback& callback) = 0;
164 172
165 protected: 173 protected:
166 virtual ~HostZoomMap() {} 174 virtual ~HostZoomMap() {}
167 }; 175 };
168 176
169 } // namespace content 177 } // namespace content
170 178
171 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ 179 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698