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

Side by Side Diff: ui/gfx/screen.h

Issue 9616045: Aura/Ash split: Move ScreenAura to ash::ScreenAsh. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use a separate aura::TestScreen in tests instead, partially reverting to patchset 2 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 | « ui/aura/test/test_screen.cc ('k') | ui/gfx/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) 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_GFX_SCREEN_H_ 5 #ifndef UI_GFX_SCREEN_H_
6 #define UI_GFX_SCREEN_H_ 6 #define UI_GFX_SCREEN_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/gfx/point.h" 10 #include "ui/gfx/point.h"
11 #include "ui/gfx/rect.h" 11 #include "ui/gfx/rect.h"
12 #include "ui/gfx/size.h" 12 #include "ui/gfx/size.h"
13 13
14 namespace gfx { 14 namespace gfx {
15 15
16 // A utility class for getting various info about screen size, monitors, 16 // A utility class for getting various info about screen size, monitors,
17 // cursor position, etc. 17 // cursor position, etc.
18 // TODO(erikkay) add more of those methods here 18 // TODO(erikkay) add more of those methods here
19 class UI_EXPORT Screen { 19 class UI_EXPORT Screen {
20 public: 20 public:
21 virtual ~Screen() {} 21 virtual ~Screen() {}
22 22
23 #if defined(USE_AURA) 23 #if defined(USE_ASH)
24 // Sets the instance to use. This takes owernship of |screen|, deleting the 24 // Sets the instance to use. This takes owernship of |screen|, deleting the
25 // old instance. This is used on aura to avoid circular dependencies between 25 // old instance. This is used on aura to avoid circular dependencies between
26 // ui and aura. 26 // ui and aura.
27 static void SetInstance(Screen* screen); 27 static void SetInstance(Screen* screen);
28 #endif 28 #endif
29 29
30 // Returns the current absolute position of the mouse pointer. 30 // Returns the current absolute position of the mouse pointer.
31 static gfx::Point GetCursorScreenPoint(); 31 static gfx::Point GetCursorScreenPoint();
32 32
33 // Returns the work area of the monitor nearest the specified window. 33 // Returns the work area of the monitor nearest the specified window.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 private: 81 private:
82 #if defined(USE_AURA) 82 #if defined(USE_AURA)
83 // The singleton screen instance. Only used on aura. 83 // The singleton screen instance. Only used on aura.
84 static Screen* instance_; 84 static Screen* instance_;
85 #endif 85 #endif
86 }; 86 };
87 87
88 } // namespace gfx 88 } // namespace gfx
89 89
90 #endif // VIEWS_SCREEN_H_ 90 #endif // VIEWS_SCREEN_H_
OLDNEW
« no previous file with comments | « ui/aura/test/test_screen.cc ('k') | ui/gfx/screen_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698