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

Side by Side Diff: ash/screen_ash.h

Issue 9699013: MonitorManager to manage multiple monitors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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 | « no previous file | ash/screen_ash.cc » ('j') | ash/shell.h » ('J')
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/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 void set_work_area_insets(const gfx::Insets& insets) {
28 work_area_insets_ = insets;
29 }
30 const gfx::Insets& work_area_insets() const { return work_area_insets_; }
31
32 protected: 27 protected:
33 virtual gfx::Point GetCursorScreenPointImpl() OVERRIDE; 28 virtual gfx::Point GetCursorScreenPointImpl() OVERRIDE;
34 virtual gfx::Rect GetMonitorWorkAreaNearestWindowImpl( 29 virtual gfx::Rect GetMonitorWorkAreaNearestWindowImpl(
35 gfx::NativeView view) OVERRIDE; 30 gfx::NativeView view) OVERRIDE;
36 virtual gfx::Rect GetMonitorAreaNearestWindowImpl( 31 virtual gfx::Rect GetMonitorAreaNearestWindowImpl(
37 gfx::NativeView view) OVERRIDE; 32 gfx::NativeView view) OVERRIDE;
38 virtual gfx::Rect GetMonitorWorkAreaNearestPointImpl( 33 virtual gfx::Rect GetMonitorWorkAreaNearestPointImpl(
39 const gfx::Point& point) OVERRIDE; 34 const gfx::Point& point) OVERRIDE;
40 virtual gfx::Rect GetMonitorAreaNearestPointImpl( 35 virtual gfx::Rect GetMonitorAreaNearestPointImpl(
41 const gfx::Point& point) OVERRIDE; 36 const gfx::Point& point) OVERRIDE;
42 virtual gfx::NativeWindow GetWindowAtCursorScreenPointImpl() OVERRIDE; 37 virtual gfx::NativeWindow GetWindowAtCursorScreenPointImpl() OVERRIDE;
43 virtual gfx::Size GetPrimaryMonitorSizeImpl() OVERRIDE; 38 virtual gfx::Size GetPrimaryMonitorSizeImpl() OVERRIDE;
44 virtual int GetNumMonitorsImpl() OVERRIDE; 39 virtual int GetNumMonitorsImpl() OVERRIDE;
45 40
46 private: 41 private:
47 // We currently support only one monitor. These two methods return the bounds
48 // and work area.
49 gfx::Rect GetBounds();
50 gfx::Rect GetWorkAreaBounds();
51
52 // Insets for the work area.
53 gfx::Insets work_area_insets_;
54
55 aura::RootWindow* root_window_; 42 aura::RootWindow* root_window_;
56 43
57 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); 44 DISALLOW_COPY_AND_ASSIGN(ScreenAsh);
58 }; 45 };
59 46
60 } // namespace ash 47 } // namespace ash
61 48
62 #endif // ASH_SCREEN_ASH_H_ 49 #endif // ASH_SCREEN_ASH_H_
OLDNEW
« no previous file with comments | « no previous file | ash/screen_ash.cc » ('j') | ash/shell.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698