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