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

Side by Side Diff: ash/screen_ash.h

Issue 11363124: Move DisplayManager and DisplayChangeObserverX11 from aura to ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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_SCREEN_ASH_H_ 5 #ifndef ASH_SCREEN_ASH_H_
6 #define ASH_SCREEN_ASH_H_ 6 #define ASH_SCREEN_ASH_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/observer_list.h"
10 #include "ui/gfx/screen.h" 11 #include "ui/gfx/screen.h"
11 12
12 namespace gfx { 13 namespace gfx {
13 class Rect; 14 class Rect;
14 } 15 }
15 16
16 namespace ash { 17 namespace ash {
17 18
18 // Aura implementation of gfx::Screen. Implemented here to avoid circular 19 // Aura implementation of gfx::Screen. Implemented here to avoid circular
19 // dependencies. 20 // dependencies.
(...skipping 28 matching lines...) Expand all
48 const gfx::Rect& rect); 49 const gfx::Rect& rect);
49 50
50 // Returns a gfx::Display object for secondary display. Returns 51 // Returns a gfx::Display object for secondary display. Returns
51 // invalid display if there is no secondary display connected. 52 // invalid display if there is no secondary display connected.
52 static const gfx::Display& GetSecondaryDisplay(); 53 static const gfx::Display& GetSecondaryDisplay();
53 54
54 // Returns a gfx::Display object for the specified id. Returns 55 // Returns a gfx::Display object for the specified id. Returns
55 // invalid display if no such display is connected. 56 // invalid display if no such display is connected.
56 static const gfx::Display& GetDisplayForId(int64 display_id); 57 static const gfx::Display& GetDisplayForId(int64 display_id);
57 58
59 // Notifies observers of display configuration changes.
60 void NotifyBoundsChanged(const gfx::Display& display);
61 void NotifyDisplayAdded(const gfx::Display& display);
62 void NotifyDisplayRemoved(const gfx::Display& display);
63
58 protected: 64 protected:
59 // Implementation of gfx::Screen: 65 // Implementation of gfx::Screen:
60 virtual bool IsDIPEnabled() OVERRIDE; 66 virtual bool IsDIPEnabled() OVERRIDE;
61 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; 67 virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
62 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; 68 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE;
63
64 virtual int GetNumDisplays() OVERRIDE; 69 virtual int GetNumDisplays() OVERRIDE;
65 virtual gfx::Display GetDisplayNearestWindow( 70 virtual gfx::Display GetDisplayNearestWindow(
66 gfx::NativeView view) const OVERRIDE; 71 gfx::NativeView view) const OVERRIDE;
67 virtual gfx::Display GetDisplayNearestPoint( 72 virtual gfx::Display GetDisplayNearestPoint(
68 const gfx::Point& point) const OVERRIDE; 73 const gfx::Point& point) const OVERRIDE;
69 virtual gfx::Display GetDisplayMatching( 74 virtual gfx::Display GetDisplayMatching(
70 const gfx::Rect& match_rect) const OVERRIDE; 75 const gfx::Rect& match_rect) const OVERRIDE;
71 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; 76 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE;
77 virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE;
78 virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE;
72 79
73 private: 80 private:
81 ObserverList<gfx::DisplayObserver> observers_;
82
74 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); 83 DISALLOW_COPY_AND_ASSIGN(ScreenAsh);
75 }; 84 };
76 85
77 } // namespace ash 86 } // namespace ash
78 87
79 #endif // ASH_SCREEN_ASH_H_ 88 #endif // ASH_SCREEN_ASH_H_
OLDNEW
« no previous file with comments | « ash/root_window_controller_unittest.cc ('k') | ash/screen_ash.cc » ('j') | ash/shell.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698