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

Side by Side Diff: ui/aura/test/test_screen.cc

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.h ('k') | ui/gfx/screen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/aura/test/test_screen.h"
6
7 #include "base/logging.h"
8 #include "ui/aura/root_window.h"
9 #include "ui/aura/window.h"
10 #include "ui/gfx/native_widget_types.h"
11
12 namespace aura {
13
14 TestScreen::TestScreen(aura::RootWindow* root_window)
15 : root_window_(root_window) {
16 }
17
18 TestScreen::~TestScreen() {
19 }
20
21 gfx::Point TestScreen::GetCursorScreenPointImpl() {
22 return root_window_->last_mouse_location();
23 }
24
25 gfx::Rect TestScreen::GetMonitorWorkAreaNearestWindowImpl(
26 gfx::NativeWindow window) {
27 return GetBounds();
28 }
29
30 gfx::Rect TestScreen::GetMonitorAreaNearestWindowImpl(
31 gfx::NativeWindow window) {
32 return GetBounds();
33 }
34
35 gfx::Rect TestScreen::GetMonitorWorkAreaNearestPointImpl(
36 const gfx::Point& point) {
37 return GetBounds();
38 }
39
40 gfx::Rect TestScreen::GetMonitorAreaNearestPointImpl(const gfx::Point& point) {
41 return GetBounds();
42 }
43
44 gfx::NativeWindow TestScreen::GetWindowAtCursorScreenPointImpl() {
45 const gfx::Point point = GetCursorScreenPoint();
46 return root_window_->GetTopWindowContainingPoint(point);
47 }
48
49 gfx::Rect TestScreen::GetBounds() {
50 return gfx::Rect(root_window_->bounds().size());
51 }
52
53 gfx::Size TestScreen::GetPrimaryMonitorSizeImpl() {
54 return GetBounds().size();
55 }
56
57 int TestScreen::GetNumMonitorsImpl() {
58 return 1;
59 }
60
61 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/test/test_screen.h ('k') | ui/gfx/screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698