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

Side by Side Diff: ash/monitor/monitor_controller.h

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 8 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
« no previous file with comments | « ash/app_list/app_list_view.cc ('k') | ash/monitor/monitor_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ASH_MONITOR_MONITOR_CONTROLLER_H_ 5 #ifndef ASH_MONITOR_MONITOR_CONTROLLER_H_
6 #define ASH_MONITOR_MONITOR_CONTROLLER_H_ 6 #define ASH_MONITOR_MONITOR_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "ui/aura/monitor_manager.h" 13 #include "ui/aura/monitor_manager.h"
14 #include "ui/aura/monitor_observer.h"
14 15
15 namespace aura { 16 namespace aura {
17 class Monitor;
16 class RootWindow; 18 class RootWindow;
17 } 19 }
18 20
19 namespace ash { 21 namespace ash {
20 namespace internal { 22 namespace internal {
21 23
22 // MonitorController creates and maintains RootWindows for each 24 // MonitorController creates and maintains RootWindows for each
23 // attached monitor, keeping them in sync with monitor configuration changes. 25 // attached monitor, keeping them in sync with monitor configuration changes.
24 class MonitorController : public aura::MonitorObserver { 26 class MonitorController : public aura::MonitorObserver {
25 public: 27 public:
26 MonitorController(); 28 MonitorController();
27 virtual ~MonitorController(); 29 virtual ~MonitorController();
28 30
29 // aura::MonitorObserver overrides: 31 // aura::MonitorObserver overrides:
30 virtual void OnMonitorBoundsChanged(const aura::Monitor* monitor) OVERRIDE; 32 virtual void OnMonitorBoundsChanged(
31 virtual void OnMonitorAdded(aura::Monitor* monitor) OVERRIDE; 33 const gfx::Monitor& monitor) OVERRIDE;
32 virtual void OnMonitorRemoved(const aura::Monitor* monitor) OVERRIDE; 34 virtual void OnMonitorAdded(const gfx::Monitor& monitor) OVERRIDE;
35 virtual void OnMonitorRemoved(const gfx::Monitor& monitor) OVERRIDE;
33 36
34 private: 37 private:
35 void Init(); 38 void Init();
36 39
37 std::map<const aura::Monitor*, aura::RootWindow*> root_windows_; 40 std::map<int, aura::RootWindow*> root_windows_;
38 41
39 DISALLOW_COPY_AND_ASSIGN(MonitorController); 42 DISALLOW_COPY_AND_ASSIGN(MonitorController);
40 }; 43 };
41 44
42 } // namespace internal 45 } // namespace internal
43 } // namespace ash 46 } // namespace ash
44 47
45 #endif // ASH_MONITOR_MONITOR_CONTROLLER_H_ 48 #endif // ASH_MONITOR_MONITOR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/app_list/app_list_view.cc ('k') | ash/monitor/monitor_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698