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

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

Issue 10221028: Move DIP translation from ui/aura to ui/compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert change i made by accident Created 8 years, 7 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) 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_MULTI_MONITOR_MANAGER_H_ 5 #ifndef ASH_MONITOR_MULTI_MONITOR_MANAGER_H_
6 #define ASH_MONITOR_MULTI_MONITOR_MANAGER_H_ 6 #define ASH_MONITOR_MULTI_MONITOR_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ash/ash_export.h" 9 #include "ash/ash_export.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 19 matching lines...) Expand all
30 class ASH_EXPORT MultiMonitorManager : public aura::MonitorManager, 30 class ASH_EXPORT MultiMonitorManager : public aura::MonitorManager,
31 public aura::RootWindowObserver { 31 public aura::RootWindowObserver {
32 public: 32 public:
33 MultiMonitorManager(); 33 MultiMonitorManager();
34 virtual ~MultiMonitorManager(); 34 virtual ~MultiMonitorManager();
35 35
36 // Used to emulate monitor change when run in a desktop environment instead 36 // Used to emulate monitor change when run in a desktop environment instead
37 // of on a device. 37 // of on a device.
38 static void AddRemoveMonitor(); 38 static void AddRemoveMonitor();
39 static void CycleMonitor(); 39 static void CycleMonitor();
40 static void ScaleMonitor();
sky 2012/05/08 00:41:59 Should this be named ToggleMonitorScale?
oshima 2012/05/08 01:24:16 Done.
40 41
41 bool UpdateWorkAreaOfMonitorNearestWindow(const aura::Window* window, 42 bool UpdateWorkAreaOfMonitorNearestWindow(const aura::Window* window,
42 const gfx::Insets& insets); 43 const gfx::Insets& insets);
43 44
44 // MonitorManager overrides: 45 // MonitorManager overrides:
45 virtual void OnNativeMonitorsChanged( 46 virtual void OnNativeMonitorsChanged(
46 const std::vector<gfx::Monitor>& monitors) OVERRIDE; 47 const std::vector<gfx::Monitor>& monitors) OVERRIDE;
47 virtual aura::RootWindow* CreateRootWindowForMonitor( 48 virtual aura::RootWindow* CreateRootWindowForMonitor(
48 const gfx::Monitor& monitor) OVERRIDE; 49 const gfx::Monitor& monitor) OVERRIDE;
49 virtual const gfx::Monitor& GetMonitorAt(size_t index) OVERRIDE; 50 virtual const gfx::Monitor& GetMonitorAt(size_t index) OVERRIDE;
50 51
51 virtual size_t GetNumMonitors() const OVERRIDE; 52 virtual size_t GetNumMonitors() const OVERRIDE;
52 virtual const gfx::Monitor& GetMonitorNearestPoint( 53 virtual const gfx::Monitor& GetMonitorNearestPoint(
53 const gfx::Point& point) const OVERRIDE; 54 const gfx::Point& point) const OVERRIDE;
54 virtual const gfx::Monitor& GetMonitorNearestWindow( 55 virtual const gfx::Monitor& GetMonitorNearestWindow(
55 const aura::Window* window) const OVERRIDE; 56 const aura::Window* window) const OVERRIDE;
56 57
57 // RootWindowObserver overrides: 58 // RootWindowObserver overrides:
58 virtual void OnRootWindowResized(const aura::RootWindow* root, 59 virtual void OnRootWindowResized(const aura::RootWindow* root,
59 const gfx::Size& new_size) OVERRIDE; 60 const gfx::Size& new_size) OVERRIDE;
60 61
61 private: 62 private:
62 typedef std::vector<gfx::Monitor> Monitors; 63 typedef std::vector<gfx::Monitor> Monitors;
63 64
64 void Init(); 65 void Init();
65 void AddRemoveMonitorImpl(); 66 void AddRemoveMonitorImpl();
66 void CycleMonitorImpl(); 67 void CycleMonitorImpl();
68 void ScaleMonitorImpl();
67 gfx::Monitor& FindMonitorById(int id); 69 gfx::Monitor& FindMonitorById(int id);
68 70
69 Monitors monitors_; 71 Monitors monitors_;
70 72
71 DISALLOW_COPY_AND_ASSIGN(MultiMonitorManager); 73 DISALLOW_COPY_AND_ASSIGN(MultiMonitorManager);
72 }; 74 };
73 75
74 extern const aura::WindowProperty<int>* const kMonitorIdKey; 76 extern const aura::WindowProperty<int>* const kMonitorIdKey;
75 77
76 } // namespace internal 78 } // namespace internal
77 } // namespace ash 79 } // namespace ash
78 80
79 #endif // ASH_MONITOR_MULTI_MONITOR_MANAGER_H_ 81 #endif // ASH_MONITOR_MULTI_MONITOR_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698