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

Side by Side Diff: chrome/browser/host_zoom_map.h

Issue 6413014: Original patch from issue 570048 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: a few fixes Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Maps hostnames to custom zoom levels. Written on the UI thread and read on 5 // Maps hostnames to custom zoom levels. Written on the UI thread and read on
6 // any thread. One instance per profile. 6 // any thread. One instance per profile.
7 7
8 #ifndef CHROME_BROWSER_HOST_ZOOM_MAP_H_ 8 #ifndef CHROME_BROWSER_HOST_ZOOM_MAP_H_
9 #define CHROME_BROWSER_HOST_ZOOM_MAP_H_ 9 #define CHROME_BROWSER_HOST_ZOOM_MAP_H_
10 #pragma once 10 #pragma once
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // level, which may be positive (to zoom in) or negative (to zoom out). 43 // level, which may be positive (to zoom in) or negative (to zoom out).
44 // 44 //
45 // This may be called on any thread. 45 // This may be called on any thread.
46 double GetZoomLevel(const GURL& url) const; 46 double GetZoomLevel(const GURL& url) const;
47 47
48 // Sets the zoom level for a given url to |level|. If the level matches the 48 // Sets the zoom level for a given url to |level|. If the level matches the
49 // current default zoom level, the host is erased from the saved preferences; 49 // current default zoom level, the host is erased from the saved preferences;
50 // otherwise the new value is written out. 50 // otherwise the new value is written out.
51 // 51 //
52 // This should only be called on the UI thread. 52 // This should only be called on the UI thread.
53 void SetZoomLevel(const GURL& url, double level); 53 void SetZoomLevel(const GURL& url, int request_id, double level);
54 54
55 // Returns the temporary zoom level that's only valid for the lifetime of 55 // Returns the temporary zoom level that's only valid for the lifetime of
56 // the given tab (i.e. isn't saved and doesn't affect other tabs) if it 56 // the given tab (i.e. isn't saved and doesn't affect other tabs) if it
57 // exists, the default zoom level otherwise. 57 // exists, the default zoom level otherwise.
58 // 58 //
59 // This may be called on any thread. 59 // This may be called on any thread.
60 double GetTemporaryZoomLevel(int render_process_id, 60 double GetTemporaryZoomLevel(int render_process_id,
61 int render_view_id) const; 61 int render_view_id) const;
62 62
63 // Sets the temporary zoom level that's only valid for the lifetime of this 63 // Sets the temporary zoom level that's only valid for the lifetime of this
64 // tab. 64 // tab.
65 // 65 //
66 // This should only be called on the UI thread. 66 // This should only be called on the UI thread.
67 void SetTemporaryZoomLevel(int render_process_id, 67 void SetTemporaryZoomLevel(int render_process_id,
68 int render_view_id, 68 int render_view_id,
69 int request_id,
69 double level); 70 double level);
70 71
71 // Resets all zoom levels. 72 // Resets all zoom levels.
72 // 73 //
73 // This should only be called on the UI thread. 74 // This should only be called on the UI thread.
74 void ResetToDefaults(); 75 void ResetToDefaults();
75 76
76 // NotificationObserver implementation. 77 // NotificationObserver implementation.
77 virtual void Observe(NotificationType type, 78 virtual void Observe(NotificationType type,
78 const NotificationSource& source, 79 const NotificationSource& source,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // notifications from the preference service that we triggered ourself. 119 // notifications from the preference service that we triggered ourself.
119 bool updating_preferences_; 120 bool updating_preferences_;
120 121
121 NotificationRegistrar registrar_; 122 NotificationRegistrar registrar_;
122 PrefChangeRegistrar pref_change_registrar_; 123 PrefChangeRegistrar pref_change_registrar_;
123 124
124 DISALLOW_COPY_AND_ASSIGN(HostZoomMap); 125 DISALLOW_COPY_AND_ASSIGN(HostZoomMap);
125 }; 126 };
126 127
127 #endif // CHROME_BROWSER_HOST_ZOOM_MAP_H_ 128 #endif // CHROME_BROWSER_HOST_ZOOM_MAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698