OLD | NEW |
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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
11 #include "ui/gfx/insets.h" | 11 #include "ui/gfx/insets.h" |
12 #include "ui/gfx/rect.h" | 12 #include "ui/gfx/rect.h" |
13 #include "ui/gfx/screen_impl.h" | 13 #include "ui/gfx/screen_impl.h" |
14 | 14 |
15 namespace aura { | |
16 class RootWindow; | |
17 } | |
18 | |
19 namespace ash { | 15 namespace ash { |
20 | 16 |
21 // Aura implementation of gfx::Screen. Implemented here to avoid circular | 17 // Aura implementation of gfx::Screen. Implemented here to avoid circular |
22 // dependencies. | 18 // dependencies. |
23 class ASH_EXPORT ScreenAsh : public gfx::ScreenImpl { | 19 class ASH_EXPORT ScreenAsh : public gfx::ScreenImpl { |
24 public: | 20 public: |
25 explicit ScreenAsh(aura::RootWindow* root_window); | 21 ScreenAsh(); |
26 virtual ~ScreenAsh(); | 22 virtual ~ScreenAsh(); |
27 | 23 |
28 // Returns the bounds for maximized windows. Maximized windows trigger | 24 // Returns the bounds for maximized windows. Maximized windows trigger |
29 // auto-hiding the shelf. | 25 // auto-hiding the shelf. |
30 static gfx::Rect GetMaximizedWindowBounds(aura::Window* window); | 26 static gfx::Rect GetMaximizedWindowBounds(aura::Window* window); |
31 | 27 |
32 // Returns work area when a maximized window is not present. | 28 // Returns work area when a maximized window is not present. |
33 static gfx::Rect GetUnmaximizedWorkAreaBounds(aura::Window* window); | 29 static gfx::Rect GetUnmaximizedWorkAreaBounds(aura::Window* window); |
34 | 30 |
35 protected: | 31 protected: |
36 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; | 32 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; |
37 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; | 33 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; |
38 | 34 |
39 virtual int GetNumMonitors() OVERRIDE; | 35 virtual int GetNumMonitors() OVERRIDE; |
40 virtual gfx::Monitor GetMonitorNearestWindow( | 36 virtual gfx::Monitor GetMonitorNearestWindow( |
41 gfx::NativeView view) const OVERRIDE; | 37 gfx::NativeView view) const OVERRIDE; |
42 virtual gfx::Monitor GetMonitorNearestPoint( | 38 virtual gfx::Monitor GetMonitorNearestPoint( |
43 const gfx::Point& point) const OVERRIDE; | 39 const gfx::Point& point) const OVERRIDE; |
44 virtual gfx::Monitor GetPrimaryMonitor() const OVERRIDE; | 40 virtual gfx::Monitor GetPrimaryMonitor() const OVERRIDE; |
45 | 41 |
46 private: | 42 private: |
47 aura::RootWindow* root_window_; | |
48 | |
49 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); | 43 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); |
50 }; | 44 }; |
51 | 45 |
52 } // namespace ash | 46 } // namespace ash |
53 | 47 |
54 #endif // ASH_SCREEN_ASH_H_ | 48 #endif // ASH_SCREEN_ASH_H_ |
OLD | NEW |