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

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: fix command line 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
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/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::ScreenImpl {
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 27 // Returns the bounds for maximized windows. Maximized windows trigger
28 // auto-hiding the shelf. 28 // auto-hiding the shelf.
29 static gfx::Rect GetMaximizedWindowBounds(aura::Window* window); 29 static gfx::Rect GetMaximizedWindowBounds(aura::Window* window);
30 30
31 // Returns work area when a maximized window is not present. 31 // Returns work area when a maximized window is not present.
32 static gfx::Rect GetUnmaximizedWorkAreaBounds(aura::Window* window); 32 static gfx::Rect GetUnmaximizedWorkAreaBounds(aura::Window* window);
33 33
34 protected: 34 protected:
35 virtual gfx::Point GetCursorScreenPointImpl() OVERRIDE; 35 virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
36 virtual gfx::Rect GetMonitorWorkAreaNearestWindowImpl( 36 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE;
37
38 virtual int GetNumMonitors() OVERRIDE;
39 virtual const gfx::Monitor* GetMonitorNearestWindow(
37 gfx::NativeView view) OVERRIDE; 40 gfx::NativeView view) OVERRIDE;
38 virtual gfx::Rect GetMonitorAreaNearestWindowImpl( 41 virtual const gfx::Monitor* GetMonitorNearestPoint(
39 gfx::NativeView view) OVERRIDE;
40 virtual gfx::Rect GetMonitorWorkAreaNearestPointImpl(
41 const gfx::Point& point) OVERRIDE; 42 const gfx::Point& point) OVERRIDE;
42 virtual gfx::Rect GetMonitorAreaNearestPointImpl( 43 virtual const gfx::Monitor* GetPrimaryMonitor() OVERRIDE;
43 const gfx::Point& point) OVERRIDE; 44
44 virtual gfx::NativeWindow GetWindowAtCursorScreenPointImpl() OVERRIDE; 45 virtual void AddMonitorObserver(gfx::MonitorObserver* observer) OVERRIDE;
45 virtual gfx::Size GetPrimaryMonitorSizeImpl() OVERRIDE; 46 virtual void RemoveMonitorObserver(gfx::MonitorObserver* observer) OVERRIDE;
46 virtual int GetNumMonitorsImpl() OVERRIDE;
47 47
48 private: 48 private:
49 aura::RootWindow* root_window_; 49 aura::RootWindow* root_window_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); 51 DISALLOW_COPY_AND_ASSIGN(ScreenAsh);
52 }; 52 };
53 53
54 } // namespace ash 54 } // namespace ash
55 55
56 #endif // ASH_SCREEN_ASH_H_ 56 #endif // ASH_SCREEN_ASH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698