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

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

Issue 10082008: Aura demo fix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export Created 8 years, 8 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/test/aura_test_base.cc ('k') | ui/aura/test/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_TEST_SINGLE_MONITOR_MANAGER_H_
6 #define UI_AURA_TEST_SINGLE_MONITOR_MANAGER_H_
7 #pragma once
8
9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/aura/monitor_manager.h"
12 #include "ui/aura/window_observer.h"
13
14 namespace gfx {
15 class Rect;
16 }
17
18 namespace aura {
19 namespace test {
20
21 // A monitor manager assuming there is one monitor.
22 class 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<const Monitor*>& monitors) OVERRIDE;
31 virtual RootWindow* CreateRootWindowForMonitor(
32 Monitor* monitor) OVERRIDE;
33 virtual const Monitor* GetMonitorNearestWindow(
34 const Window* window) const OVERRIDE;
35 virtual const Monitor* GetMonitorNearestPoint(
36 const gfx::Point& point) const OVERRIDE;
37 virtual Monitor* GetMonitorAt(size_t index) OVERRIDE;
38 virtual size_t GetNumMonitors() const OVERRIDE;
39 virtual Monitor* GetMonitorNearestWindow(const Window* window) OVERRIDE;
40
41 // WindowObserver overrides:
42 virtual void OnWindowBoundsChanged(Window* window,
43 const gfx::Rect& bounds) OVERRIDE;
44 virtual void OnWindowDestroying(Window* window) OVERRIDE;
45
46 private:
47 void Init();
48 void Update(const gfx::Size size);
49
50 RootWindow* root_window_;
51 scoped_ptr<Monitor> monitor_;
52
53 DISALLOW_COPY_AND_ASSIGN(SingleMonitorManager);
54 };
55
56 } // namespace test
57 } // namespace aura
58
59 #endif // UI_AURA_TEST_SINGLE_MONITOR_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/aura/test/aura_test_base.cc ('k') | ui/aura/test/single_monitor_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698