| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_AURA_SCREEN_AURA_H_ | 5 #ifndef ASH_SCREEN_ASH_H_ |
| 6 #define UI_AURA_SCREEN_AURA_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 "ui/aura/aura_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; |
| 16 } |
| 15 | 17 |
| 16 class RootWindow; | 18 namespace ash { |
| 17 | 19 |
| 18 // Aura implementation of gfx::Screen. Implemented here to avoid circular | 20 // Aura implementation of gfx::Screen. Implemented here to avoid circular |
| 19 // dependencies. | 21 // dependencies. |
| 20 class AURA_EXPORT ScreenAura : public gfx::Screen { | 22 class ASH_EXPORT ScreenAsh : public gfx::Screen { |
| 21 public: | 23 public: |
| 22 explicit ScreenAura(RootWindow* root_window); | 24 explicit ScreenAsh(aura::RootWindow* root_window); |
| 23 virtual ~ScreenAura(); | 25 virtual ~ScreenAsh(); |
| 24 | 26 |
| 25 void set_work_area_insets(const gfx::Insets& insets) { | 27 void set_work_area_insets(const gfx::Insets& insets) { |
| 26 work_area_insets_ = insets; | 28 work_area_insets_ = insets; |
| 27 } | 29 } |
| 28 const gfx::Insets& work_area_insets() const { return work_area_insets_; } | 30 const gfx::Insets& work_area_insets() const { return work_area_insets_; } |
| 29 | 31 |
| 30 protected: | 32 protected: |
| 31 virtual gfx::Point GetCursorScreenPointImpl() OVERRIDE; | 33 virtual gfx::Point GetCursorScreenPointImpl() OVERRIDE; |
| 32 virtual gfx::Rect GetMonitorWorkAreaNearestWindowImpl( | 34 virtual gfx::Rect GetMonitorWorkAreaNearestWindowImpl( |
| 33 gfx::NativeView view) OVERRIDE; | 35 gfx::NativeView view) OVERRIDE; |
| 34 virtual gfx::Rect GetMonitorAreaNearestWindowImpl( | 36 virtual gfx::Rect GetMonitorAreaNearestWindowImpl( |
| 35 gfx::NativeView view) OVERRIDE; | 37 gfx::NativeView view) OVERRIDE; |
| 36 virtual gfx::Rect GetMonitorWorkAreaNearestPointImpl( | 38 virtual gfx::Rect GetMonitorWorkAreaNearestPointImpl( |
| 37 const gfx::Point& point) OVERRIDE; | 39 const gfx::Point& point) OVERRIDE; |
| 38 virtual gfx::Rect GetMonitorAreaNearestPointImpl( | 40 virtual gfx::Rect GetMonitorAreaNearestPointImpl( |
| 39 const gfx::Point& point) OVERRIDE; | 41 const gfx::Point& point) OVERRIDE; |
| 40 virtual gfx::NativeWindow GetWindowAtCursorScreenPointImpl() OVERRIDE; | 42 virtual gfx::NativeWindow GetWindowAtCursorScreenPointImpl() OVERRIDE; |
| 41 virtual gfx::Size GetPrimaryMonitorSizeImpl() OVERRIDE; | 43 virtual gfx::Size GetPrimaryMonitorSizeImpl() OVERRIDE; |
| 42 virtual int GetNumMonitorsImpl() OVERRIDE; | 44 virtual int GetNumMonitorsImpl() OVERRIDE; |
| 43 | 45 |
| 44 private: | 46 private: |
| 45 // We currently support only one monitor. These two methods return the bounds | 47 // We currently support only one monitor. These two methods return the bounds |
| 46 // and work area. | 48 // and work area. |
| 47 gfx::Rect GetBounds(); | 49 gfx::Rect GetBounds(); |
| 48 gfx::Rect GetWorkAreaBounds(); | 50 gfx::Rect GetWorkAreaBounds(); |
| 49 | 51 |
| 50 // Insets for the work area. | 52 // Insets for the work area. |
| 51 gfx::Insets work_area_insets_; | 53 gfx::Insets work_area_insets_; |
| 52 | 54 |
| 53 RootWindow* root_window_; | 55 aura::RootWindow* root_window_; |
| 54 | 56 |
| 55 DISALLOW_COPY_AND_ASSIGN(ScreenAura); | 57 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); |
| 56 }; | 58 }; |
| 57 | 59 |
| 58 } // namespace aura | 60 } // namespace ash |
| 59 | 61 |
| 60 #endif // UI_AURA_SCREEN_AURA_H_ | 62 #endif // ASH_SCREEN_ASH_H_ |
| OLD | NEW |