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

Side by Side Diff: chrome/browser/ui/zoom/chrome_zoom_level_otr_delegate.h

Issue 769593003: Move ZoomObserver, ZoomController and ZoomEventManager to components/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete defines in build files. Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_OTR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_OTR_DELEGATE_H_
6 #define CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_OTR_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_OTR_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "content/public/browser/host_zoom_map.h" 11 #include "content/public/browser/host_zoom_map.h"
12 #include "content/public/browser/zoom_level_delegate.h" 12 #include "content/public/browser/zoom_level_delegate.h"
13 13
14 namespace ui_zoom {
14 class ZoomEventManager; 15 class ZoomEventManager;
16 }
15 17
16 namespace chrome { 18 namespace chrome {
17 19
18 // This class is a light-weight version of ChromeZoomLevelPrefs and is used 20 // This class is a light-weight version of ChromeZoomLevelPrefs and is used
19 // to connect an OTR StoragePartition's HostZoomMap to the OTR profile's 21 // to connect an OTR StoragePartition's HostZoomMap to the OTR profile's
20 // ZoomEventManager. 22 // ZoomEventManager.
21 class ChromeZoomLevelOTRDelegate : public content::ZoomLevelDelegate { 23 class ChromeZoomLevelOTRDelegate : public content::ZoomLevelDelegate {
22 public: 24 public:
23 ChromeZoomLevelOTRDelegate( 25 ChromeZoomLevelOTRDelegate(
24 base::WeakPtr<ZoomEventManager> zoom_event_manager); 26 base::WeakPtr<ui_zoom::ZoomEventManager> zoom_event_manager);
25 virtual ~ChromeZoomLevelOTRDelegate(); 27 virtual ~ChromeZoomLevelOTRDelegate();
26 28
27 // content::ZoomLevelDelegate 29 // content::ZoomLevelDelegate
28 void InitHostZoomMap(content::HostZoomMap* host_zoom_map) override; 30 void InitHostZoomMap(content::HostZoomMap* host_zoom_map) override;
29 31
30 private: 32 private:
31 // This is a callback function that receives notifications from HostZoomMap 33 // This is a callback function that receives notifications from HostZoomMap
32 // when per-host zoom levels change. It is used to update the per-host 34 // when per-host zoom levels change. It is used to update the per-host
33 // zoom levels (if any) managed by this class (for its associated partition). 35 // zoom levels (if any) managed by this class (for its associated partition).
34 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); 36 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change);
35 37
36 base::WeakPtr<ZoomEventManager> zoom_event_manager_; 38 base::WeakPtr<ui_zoom::ZoomEventManager> zoom_event_manager_;
37 content::HostZoomMap* host_zoom_map_; 39 content::HostZoomMap* host_zoom_map_;
38 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; 40 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_;
39 41
40 DISALLOW_COPY_AND_ASSIGN(ChromeZoomLevelOTRDelegate); 42 DISALLOW_COPY_AND_ASSIGN(ChromeZoomLevelOTRDelegate);
41 }; 43 };
42 44
43 } // namespace chrome 45 } // namespace chrome
44 46
45 #endif // CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_OTR_DELEGATE_H_ 47 #endif // CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_OTR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_login_handler.cc ('k') | chrome/browser/ui/zoom/chrome_zoom_level_otr_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698