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

Side by Side Diff: ash/display/multi_display_manager.h

Issue 10909043: Cancel drag if display configuration changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix, adjust test screen size Created 8 years, 3 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_DISPLAY_MULTI_DISPLAY_MANAGER_H_ 5 #ifndef ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_
6 #define ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ 6 #define ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 20 matching lines...) Expand all
31 // TODO(oshima): gfx::Screen needs to return translated coordinates 31 // TODO(oshima): gfx::Screen needs to return translated coordinates
32 // if the root window is translated. crbug.com/119268. 32 // if the root window is translated. crbug.com/119268.
33 class ASH_EXPORT MultiDisplayManager : public aura::DisplayManager, 33 class ASH_EXPORT MultiDisplayManager : public aura::DisplayManager,
34 public aura::RootWindowObserver { 34 public aura::RootWindowObserver {
35 public: 35 public:
36 MultiDisplayManager(); 36 MultiDisplayManager();
37 virtual ~MultiDisplayManager(); 37 virtual ~MultiDisplayManager();
38 38
39 // Used to emulate display change when run in a desktop environment instead 39 // Used to emulate display change when run in a desktop environment instead
40 // of on a device. 40 // of on a device.
41 static void AddRemoveDisplay();
42 static void CycleDisplay(); 41 static void CycleDisplay();
43 static void ToggleDisplayScale(); 42 static void ToggleDisplayScale();
44 43
45 bool UpdateWorkAreaOfDisplayNearestWindow(const aura::Window* window, 44 bool UpdateWorkAreaOfDisplayNearestWindow(const aura::Window* window,
46 const gfx::Insets& insets); 45 const gfx::Insets& insets);
47 46
48 // Finds the display that contains |point| in screeen coordinates. 47 // Finds the display that contains |point| in screeen coordinates.
49 // Returns invalid display if there is no display that can satisfy 48 // Returns invalid display if there is no display that can satisfy
50 // the condition. 49 // the condition.
51 const gfx::Display& FindDisplayContainingPoint( 50 const gfx::Display& FindDisplayContainingPoint(
(...skipping 17 matching lines...) Expand all
69 68
70 // RootWindowObserver overrides: 69 // RootWindowObserver overrides:
71 virtual void OnRootWindowResized(const aura::RootWindow* root, 70 virtual void OnRootWindowResized(const aura::RootWindow* root,
72 const gfx::Size& new_size) OVERRIDE; 71 const gfx::Size& new_size) OVERRIDE;
73 72
74 private: 73 private:
75 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, ConvertPoint); 74 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, ConvertPoint);
76 typedef std::vector<gfx::Display> Displays; 75 typedef std::vector<gfx::Display> Displays;
77 76
78 void Init(); 77 void Init();
79 void AddRemoveDisplayImpl();
80 void CycleDisplayImpl(); 78 void CycleDisplayImpl();
81 void ScaleDisplayImpl(); 79 void ScaleDisplayImpl();
82 gfx::Display& FindDisplayForRootWindow(const aura::RootWindow* root); 80 gfx::Display& FindDisplayForRootWindow(const aura::RootWindow* root);
83 81
84 // Refer to |aura::DisplayManager::CreateDisplayFromSpec| API for 82 // Refer to |aura::DisplayManager::CreateDisplayFromSpec| API for
85 // the format of |spec|. 83 // the format of |spec|.
86 void AddDisplayFromSpec(const std::string& spec); 84 void AddDisplayFromSpec(const std::string& spec);
87 85
88 Displays displays_; 86 Displays displays_;
89 87
90 DISALLOW_COPY_AND_ASSIGN(MultiDisplayManager); 88 DISALLOW_COPY_AND_ASSIGN(MultiDisplayManager);
91 }; 89 };
92 90
93 extern const aura::WindowProperty<int64>* const kDisplayIdKey; 91 extern const aura::WindowProperty<int64>* const kDisplayIdKey;
94 92
95 } // namespace internal 93 } // namespace internal
96 } // namespace ash 94 } // namespace ash
97 95
98 #endif // ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_ 96 #endif // ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698