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

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

Issue 11363124: Move DisplayManager and DisplayChangeObserverX11 from aura to ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix rebase 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
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/aura/single_display_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_AURA_SINGLE_DISPLAY_MANAGER_H_
6 #define UI_AURA_SINGLE_DISPLAY_MANAGER_H_
7
8 #include "base/compiler_specific.h"
9 #include "ui/aura/aura_export.h"
10 #include "ui/aura/display_manager.h"
11 #include "ui/aura/window_observer.h"
12 #include "ui/gfx/display.h"
13
14 namespace gfx {
15 class Rect;
16 }
17
18 namespace aura {
19
20 // A display manager assuming there is one display.
21 class AURA_EXPORT SingleDisplayManager : public DisplayManager,
22 public WindowObserver {
23 public:
24 SingleDisplayManager();
25 virtual ~SingleDisplayManager();
26
27 // DisplayManager overrides:
28 virtual void OnNativeDisplaysChanged(
29 const std::vector<gfx::Display>& display) OVERRIDE;
30 virtual RootWindow* CreateRootWindowForDisplay(
31 const gfx::Display& display) OVERRIDE;
32 virtual gfx::Display* GetDisplayAt(size_t index) OVERRIDE;
33
34 virtual size_t GetNumDisplays() const OVERRIDE;
35
36 virtual const gfx::Display& GetDisplayNearestWindow(
37 const Window* window) const OVERRIDE;
38 virtual const gfx::Display& GetDisplayNearestPoint(
39 const gfx::Point& point) const OVERRIDE;
40 virtual const gfx::Display& GetDisplayMatching(
41 const gfx::Rect& match_rect) const OVERRIDE;
42 virtual std::string GetDisplayNameFor(const gfx::Display& display) OVERRIDE;
43
44 // WindowObserver overrides:
45 virtual void OnWindowBoundsChanged(Window* window,
46 const gfx::Rect& old_bounds,
47 const gfx::Rect& new_bounds) OVERRIDE;
48 virtual void OnWindowDestroying(Window* window) OVERRIDE;
49
50 private:
51 void Init();
52 void Update(const gfx::Size size);
53
54 RootWindow* root_window_;
55 gfx::Display display_;
56
57 DISALLOW_COPY_AND_ASSIGN(SingleDisplayManager);
58 };
59
60 } // namespace aura
61
62 #endif // UI_AURA_SINGLE_DISPLAY_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/aura/single_display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698