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

Side by Side Diff: content/public/browser/host_zoom_map.h

Issue 226523006: Changes to content/ to facilitate new zoom extension API (work in progress) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // the complete spec of the URL. 85 // the complete spec of the URL.
86 // Sets the zoom level for the |scheme|/|host| pair to |level|. No values 86 // Sets the zoom level for the |scheme|/|host| pair to |level|. No values
87 // will be erased during this operation, and this value will not be stored in 87 // will be erased during this operation, and this value will not be stored in
88 // the preferences. 88 // the preferences.
89 // 89 //
90 // This should only be called on the UI thread. 90 // This should only be called on the UI thread.
91 virtual void SetZoomLevelForHostAndScheme(const std::string& scheme, 91 virtual void SetZoomLevelForHostAndScheme(const std::string& scheme,
92 const std::string& host, 92 const std::string& host,
93 double level) = 0; 93 double level) = 0;
94 94
95 // Sets the temporary zoom level that's only valid for the lifetime of this
96 // WebContents.
97 //
98 // This should only be called on the UI thread.
99 virtual void SetTemporaryZoomLevel(int render_process_id,
100 int render_view_id,
101 const std::string& host,
102 double level);
103
104 // Erases the temporary zoom level stored for this WebContents.
105 //
106 // This should only be called on the UI thread.
107 virtual void EraseTemporaryZoomLevel(int render_process_id,
108 int render_view_id);
109
95 // Get/Set the default zoom level for pages that don't override it. 110 // Get/Set the default zoom level for pages that don't override it.
96 virtual double GetDefaultZoomLevel() const = 0; 111 virtual double GetDefaultZoomLevel() const = 0;
97 virtual void SetDefaultZoomLevel(double level) = 0;; 112 virtual void SetDefaultZoomLevel(double level) = 0;;
98 113
99 typedef base::Callback<void(const ZoomLevelChange&)> ZoomLevelChangedCallback; 114 typedef base::Callback<void(const ZoomLevelChange&)> ZoomLevelChangedCallback;
100 typedef base::CallbackList<void(const ZoomLevelChange&)>::Subscription 115 typedef base::CallbackList<void(const ZoomLevelChange&)>::Subscription
101 Subscription; 116 Subscription;
jam 2014/05/01 23:21:13 nit: leave as is
102 // Add and remove zoom level changed callbacks. 117 // Add and remove zoom level changed callbacks.
103 virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback( 118 virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback(
104 const ZoomLevelChangedCallback& callback) = 0; 119 const ZoomLevelChangedCallback& callback) = 0;
105 120
106 protected: 121 protected:
107 virtual ~HostZoomMap() {} 122 virtual ~HostZoomMap() {}
108 }; 123 };
109 124
110 } // namespace content 125 } // namespace content
111 126
112 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ 127 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698