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

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

Issue 10675011: Rename the remaining usage of Monitor to Display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 5 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
« no previous file with comments | « ui/aura/single_display_manager.cc ('k') | ui/aura/single_monitor_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_MONITOR_MANAGER_H_
6 #define UI_AURA_SINGLE_MONITOR_MANAGER_H_
7 #pragma once
8
9 #include "base/compiler_specific.h"
10 #include "ui/aura/aura_export.h"
11 #include "ui/aura/monitor_manager.h"
12 #include "ui/aura/window_observer.h"
13 #include "ui/gfx/display.h"
14
15 namespace gfx {
16 class Rect;
17 }
18
19 namespace aura {
20
21 // A monitor manager assuming there is one monitor.
22 class AURA_EXPORT SingleMonitorManager : public MonitorManager,
23 public WindowObserver {
24 public:
25 SingleMonitorManager();
26 virtual ~SingleMonitorManager();
27
28 // MonitorManager overrides:
29 virtual void OnNativeMonitorsChanged(
30 const std::vector<gfx::Display>& display) OVERRIDE;
31 virtual RootWindow* CreateRootWindowForMonitor(
32 const gfx::Display& display) OVERRIDE;
33 virtual const gfx::Display& GetDisplayAt(size_t index) OVERRIDE;
34
35 virtual size_t GetNumDisplays() const OVERRIDE;
36
37 virtual const gfx::Display& GetDisplayNearestWindow(
38 const Window* window) const OVERRIDE;
39 virtual const gfx::Display& GetDisplayNearestPoint(
40 const gfx::Point& point) const OVERRIDE;
41
42 // WindowObserver overrides:
43 virtual void OnWindowBoundsChanged(Window* window,
44 const gfx::Rect& old_bounds,
45 const gfx::Rect& new_bounds) OVERRIDE;
46 virtual void OnWindowDestroying(Window* window) OVERRIDE;
47
48 private:
49 void Init();
50 void Update(const gfx::Size size);
51
52 RootWindow* root_window_;
53 gfx::Display display_;
54
55 DISALLOW_COPY_AND_ASSIGN(SingleMonitorManager);
56 };
57
58 } // namespace aura
59
60 #endif // UI_AURA_SINGLE_MONITOR_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/aura/single_display_manager.cc ('k') | ui/aura/single_monitor_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698