OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 browser context. | 6 // any thread. One instance per browser context. |
7 | 7 |
8 #ifndef CONTENT_BROWSER_HOST_ZOOM_MAP_H_ | 8 #ifndef CONTENT_BROWSER_HOST_ZOOM_MAP_H_ |
9 #define CONTENT_BROWSER_HOST_ZOOM_MAP_H_ | 9 #define CONTENT_BROWSER_HOST_ZOOM_MAP_H_ |
10 #pragma once | 10 #pragma once |
11 | 11 |
12 #include <map> | 12 #include <map> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "base/synchronization/lock.h" | 18 #include "base/synchronization/lock.h" |
19 #include "content/browser/browser_thread.h" | |
20 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
| 20 #include "content/public/browser/browser_thread.h" |
21 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
22 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
23 | 23 |
24 namespace base { | 24 namespace base { |
25 class DictionaryValue; | 25 class DictionaryValue; |
26 } | 26 } |
27 | 27 |
28 class GURL; | 28 class GURL; |
29 | 29 |
30 // HostZoomMap needs to be deleted on the UI thread because it listens | 30 // HostZoomMap needs to be deleted on the UI thread because it listens |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // Used around accesses to |host_zoom_levels_|, |default_zoom_level_| and | 111 // Used around accesses to |host_zoom_levels_|, |default_zoom_level_| and |
112 // |temporary_zoom_levels_| to guarantee thread safety. | 112 // |temporary_zoom_levels_| to guarantee thread safety. |
113 mutable base::Lock lock_; | 113 mutable base::Lock lock_; |
114 | 114 |
115 content::NotificationRegistrar registrar_; | 115 content::NotificationRegistrar registrar_; |
116 | 116 |
117 DISALLOW_COPY_AND_ASSIGN(HostZoomMap); | 117 DISALLOW_COPY_AND_ASSIGN(HostZoomMap); |
118 }; | 118 }; |
119 | 119 |
120 #endif // CONTENT_BROWSER_HOST_ZOOM_MAP_H_ | 120 #endif // CONTENT_BROWSER_HOST_ZOOM_MAP_H_ |
OLD | NEW |