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

Side by Side Diff: components/ui/zoom/zoom_event_manager.h

Issue 769593003: Move ZoomObserver, ZoomController and ZoomEventManager to components/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address asvitkine@'s comments. 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_ZOOM_EVENT_MANAGER_H_ 5 #ifndef COMPONENTS_UI_ZOOM_ZOOM_EVENT_MANAGER_H_
6 #define CHROME_BROWSER_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ 6 #define COMPONENTS_UI_ZOOM_ZOOM_EVENT_MANAGER_H_
7 7
8 #include "base/callback_list.h" 8 #include "base/callback_list.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/supports_user_data.h" 10 #include "base/supports_user_data.h"
11 #include "content/public/browser/host_zoom_map.h" 11 #include "content/public/browser/host_zoom_map.h"
12 12
13 namespace content { 13 namespace content {
14 class BrowserContext; 14 class BrowserContext;
15 } // namespace content 15 } // namespace content
16 16
17 namespace components {
18
17 // This class serves as a target for event notifications from all ZoomController 19 // This class serves as a target for event notifications from all ZoomController
18 // objects. Classes that need to know about browser-specific zoom events (e.g. 20 // objects. Classes that need to know about browser-specific zoom events (e.g.
19 // manual-mode zoom) should subscribe here. 21 // manual-mode zoom) should subscribe here.
20 class ZoomEventManager : public base::SupportsUserData::Data { 22 class ZoomEventManager : public base::SupportsUserData::Data {
21 public: 23 public:
22 ZoomEventManager(); 24 ZoomEventManager();
23 ~ZoomEventManager() override; 25 ~ZoomEventManager() override;
24 26
25 // Returns the ZoomEventManager for the specified BrowserContext. This 27 // Returns the ZoomEventManager for the specified BrowserContext. This
26 // function creates the ZoomEventManager if it hasn't been created already. 28 // function creates the ZoomEventManager if it hasn't been created already.
(...skipping 16 matching lines...) Expand all
43 } 45 }
44 46
45 private: 47 private:
46 base::CallbackList<void(const content::HostZoomMap::ZoomLevelChange&)> 48 base::CallbackList<void(const content::HostZoomMap::ZoomLevelChange&)>
47 zoom_level_changed_callbacks_; 49 zoom_level_changed_callbacks_;
48 base::WeakPtrFactory<ZoomEventManager> weak_ptr_factory_; 50 base::WeakPtrFactory<ZoomEventManager> weak_ptr_factory_;
49 51
50 DISALLOW_COPY_AND_ASSIGN(ZoomEventManager); 52 DISALLOW_COPY_AND_ASSIGN(ZoomEventManager);
51 }; 53 };
52 54
53 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_EVENT_MANAGER_H_ 55 } // namespace extensions
James Cook 2014/12/04 17:17:16 nit: namespace components (elsewhere too I think)
wjmaclean 2014/12/04 18:27:17 Done.
56
57 #endif // COMPONENTS_UI_ZOOM_ZOOM_EVENT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698