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

Side by Side Diff: ash/screen_ash.h

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync 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 | « ash/monitor/multi_monitor_manager_unittest.cc ('k') | ash/screen_ash.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/rect.h"
13 #include "ui/gfx/screen_impl.h"
13 14
14 namespace aura { 15 namespace aura {
15 class RootWindow; 16 class RootWindow;
16 } 17 }
17 18
18 namespace ash { 19 namespace ash {
19 20
20 // Aura implementation of gfx::Screen. Implemented here to avoid circular 21 // Aura implementation of gfx::Screen. Implemented here to avoid circular
21 // dependencies. 22 // dependencies.
22 class ASH_EXPORT ScreenAsh : public gfx::Screen { 23 class ASH_EXPORT ScreenAsh : public gfx::ScreenImpl {
23 public: 24 public:
24 explicit ScreenAsh(aura::RootWindow* root_window); 25 explicit ScreenAsh(aura::RootWindow* root_window);
25 virtual ~ScreenAsh(); 26 virtual ~ScreenAsh();
26 27
27 // Returns the bounds for maximized windows. Maximized windows trigger 28 // Returns the bounds for maximized windows. Maximized windows trigger
28 // auto-hiding the shelf. 29 // auto-hiding the shelf.
29 static gfx::Rect GetMaximizedWindowBounds(aura::Window* window); 30 static gfx::Rect GetMaximizedWindowBounds(aura::Window* window);
30 31
31 // Returns work area when a maximized window is not present. 32 // Returns work area when a maximized window is not present.
32 static gfx::Rect GetUnmaximizedWorkAreaBounds(aura::Window* window); 33 static gfx::Rect GetUnmaximizedWorkAreaBounds(aura::Window* window);
33 34
34 protected: 35 protected:
35 virtual gfx::Point GetCursorScreenPointImpl() OVERRIDE; 36 virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
36 virtual gfx::Rect GetMonitorWorkAreaNearestWindowImpl( 37 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE;
37 gfx::NativeView view) OVERRIDE; 38
38 virtual gfx::Rect GetMonitorAreaNearestWindowImpl( 39 virtual int GetNumMonitors() OVERRIDE;
39 gfx::NativeView view) OVERRIDE; 40 virtual gfx::Monitor GetMonitorNearestWindow(
40 virtual gfx::Rect GetMonitorWorkAreaNearestPointImpl( 41 gfx::NativeView view) const OVERRIDE;
41 const gfx::Point& point) OVERRIDE; 42 virtual gfx::Monitor GetMonitorNearestPoint(
42 virtual gfx::Rect GetMonitorAreaNearestPointImpl( 43 const gfx::Point& point) const OVERRIDE;
43 const gfx::Point& point) OVERRIDE; 44 virtual gfx::Monitor GetPrimaryMonitor() const OVERRIDE;
44 virtual gfx::NativeWindow GetWindowAtCursorScreenPointImpl() OVERRIDE;
45 virtual gfx::Size GetPrimaryMonitorSizeImpl() OVERRIDE;
46 virtual int GetNumMonitorsImpl() OVERRIDE;
47 45
48 private: 46 private:
49 aura::RootWindow* root_window_; 47 aura::RootWindow* root_window_;
50 48
51 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); 49 DISALLOW_COPY_AND_ASSIGN(ScreenAsh);
52 }; 50 };
53 51
54 } // namespace ash 52 } // namespace ash
55 53
56 #endif // ASH_SCREEN_ASH_H_ 54 #endif // ASH_SCREEN_ASH_H_
OLDNEW
« no previous file with comments | « ash/monitor/multi_monitor_manager_unittest.cc ('k') | ash/screen_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698