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

Side by Side Diff: ui/aura/display_manager.h

Issue 10905288: Switch primary display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync 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 UI_AURA_DISPLAY_MANAGER_H_ 5 #ifndef UI_AURA_DISPLAY_MANAGER_H_
6 #define UI_AURA_DISPLAY_MANAGER_H_ 6 #define UI_AURA_DISPLAY_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Called when display configuration has changed. The new display 60 // Called when display configuration has changed. The new display
61 // configurations is passed as a vector of Display object, which 61 // configurations is passed as a vector of Display object, which
62 // contains each display's new infomration. 62 // contains each display's new infomration.
63 virtual void OnNativeDisplaysChanged( 63 virtual void OnNativeDisplaysChanged(
64 const std::vector<gfx::Display>& display) = 0; 64 const std::vector<gfx::Display>& display) = 0;
65 65
66 // Create a root window for given |display|. 66 // Create a root window for given |display|.
67 virtual RootWindow* CreateRootWindowForDisplay( 67 virtual RootWindow* CreateRootWindowForDisplay(
68 const gfx::Display& display) = 0; 68 const gfx::Display& display) = 0;
69 69
70 // Returns the display at |index|. The display at 0 is considered "primary". 70 // Obsoleted: Do not use in new code.
71 // Returns the display at |index|. The display at 0 is
72 // no longer considered "primary".
71 virtual gfx::Display* GetDisplayAt(size_t index) = 0; 73 virtual gfx::Display* GetDisplayAt(size_t index) = 0;
72 74
73 virtual size_t GetNumDisplays() const = 0; 75 virtual size_t GetNumDisplays() const = 0;
74 76
75 // Returns the display object nearest given |window|. 77 // Returns the display object nearest given |window|.
76 virtual const gfx::Display& GetDisplayNearestWindow( 78 virtual const gfx::Display& GetDisplayNearestWindow(
77 const Window* window) const = 0; 79 const Window* window) const = 0;
78 80
79 // Returns the display object nearest given |point|. 81 // Returns the display object nearest given |point|.
80 virtual const gfx::Display& GetDisplayNearestPoint( 82 virtual const gfx::Display& GetDisplayNearestPoint(
81 const gfx::Point& point) const = 0; 83 const gfx::Point& point) const = 0;
82 84
83 // Returns the display that most closely intersects |match_rect|. 85 // Returns the display that most closely intersects |match_rect|.
84 virtual const gfx::Display& GetDisplayMatching( 86 virtual const gfx::Display& GetDisplayMatching(
85 const gfx::Rect& match_rect) const = 0; 87 const gfx::Rect& match_rect) const = 0;
86 88
87 // Returns the human-readable name for the display specified by |index|. 89 // Returns the human-readable name for the display specified by |display|.
88 virtual std::string GetDisplayNameAt(size_t index) = 0; 90 virtual std::string GetDisplayNameFor(const gfx::Display& display) = 0;
89 91
90 protected: 92 protected:
91 // Calls observers' OnDisplayBoundsChanged methods. 93 // Calls observers' OnDisplayBoundsChanged methods.
92 void NotifyBoundsChanged(const gfx::Display& display); 94 void NotifyBoundsChanged(const gfx::Display& display);
93 void NotifyDisplayAdded(const gfx::Display& display); 95 void NotifyDisplayAdded(const gfx::Display& display);
94 void NotifyDisplayRemoved(const gfx::Display& display); 96 void NotifyDisplayRemoved(const gfx::Display& display);
95 97
96 private: 98 private:
97 // If set before the RootWindow is created, the host window will cover the 99 // If set before the RootWindow is created, the host window will cover the
98 // entire display. Note that this can still be overridden via the 100 // entire display. Note that this can still be overridden via the
99 // switches::kAuraHostWindowSize flag. 101 // switches::kAuraHostWindowSize flag.
100 static bool use_fullscreen_host_window_; 102 static bool use_fullscreen_host_window_;
101 103
102 ObserverList<DisplayObserver> observers_; 104 ObserverList<DisplayObserver> observers_;
103 DISALLOW_COPY_AND_ASSIGN(DisplayManager); 105 DISALLOW_COPY_AND_ASSIGN(DisplayManager);
104 }; 106 };
105 107
106 } // namespace aura 108 } // namespace aura
107 109
108 #endif // UI_AURA_DISPLAY_MANAGER_H_ 110 #endif // UI_AURA_DISPLAY_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/display_options_handler.cc ('k') | ui/aura/root_window_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698