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

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

Issue 302603012: Zoom Extension API (content changes) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // the complete spec of the URL. 95 // the complete spec of the URL.
96 // Sets the zoom level for the |scheme|/|host| pair to |level|. No values 96 // Sets the zoom level for the |scheme|/|host| pair to |level|. No values
97 // will be erased during this operation, and this value will not be stored in 97 // will be erased during this operation, and this value will not be stored in
98 // the preferences. 98 // the preferences.
99 // 99 //
100 // This should only be called on the UI thread. 100 // This should only be called on the UI thread.
101 virtual void SetZoomLevelForHostAndScheme(const std::string& scheme, 101 virtual void SetZoomLevelForHostAndScheme(const std::string& scheme,
102 const std::string& host, 102 const std::string& host,
103 double level) = 0; 103 double level) = 0;
104 104
105 // Sets the temporary zoom level that's only valid for the lifetime of this
106 // WebContents.
107 //
108 // This should only be called on the UI thread.
109 virtual void SetTemporaryZoomLevel(int render_process_id,
110 int render_view_id,
111 const std::string& host,
112 double level) = 0;
113
114 // Erases the temporary zoom level stored for this WebContents.
115 //
116 // This should only be called on the UI thread.
117 virtual void EraseTemporaryZoomLevel(int render_process_id,
118 int render_view_id) = 0;
119
105 // Get/Set the default zoom level for pages that don't override it. 120 // Get/Set the default zoom level for pages that don't override it.
106 virtual double GetDefaultZoomLevel() const = 0; 121 virtual double GetDefaultZoomLevel() const = 0;
107 virtual void SetDefaultZoomLevel(double level) = 0;; 122 virtual void SetDefaultZoomLevel(double level) = 0;;
108 123
109 typedef base::Callback<void(const ZoomLevelChange&)> ZoomLevelChangedCallback; 124 typedef base::Callback<void(const ZoomLevelChange&)> ZoomLevelChangedCallback;
110 typedef base::CallbackList<void(const ZoomLevelChange&)>::Subscription 125 typedef base::CallbackList<void(const ZoomLevelChange&)>::Subscription
111 Subscription; 126 Subscription;
112 // Add and remove zoom level changed callbacks. 127 // Add and remove zoom level changed callbacks.
113 virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback( 128 virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback(
114 const ZoomLevelChangedCallback& callback) = 0; 129 const ZoomLevelChangedCallback& callback) = 0;
115 130
116 protected: 131 protected:
117 virtual ~HostZoomMap() {} 132 virtual ~HostZoomMap() {}
118 }; 133 };
119 134
120 } // namespace content 135 } // namespace content
121 136
122 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_ 137 #endif // CONTENT_PUBLIC_BROWSER_HOST_ZOOM_MAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698