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

Side by Side Diff: ash/test/mirror_window_test_api.cc

Issue 201573015: Introdcue AshWindowTreeHost and move ash/chrome specific code in WTH to ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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/test/mirror_window_test_api.h ('k') | ash/test/test_shell_delegate.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "ash/test/mirror_window_test_api.h" 5 #include "ash/test/mirror_window_test_api.h"
6 6
7 #include "ash/display/cursor_window_controller.h" 7 #include "ash/display/cursor_window_controller.h"
8 #include "ash/display/display_controller.h" 8 #include "ash/display/display_controller.h"
9 #include "ash/display/mirror_window_controller.h" 9 #include "ash/display/mirror_window_controller.h"
10 #include "ash/host/root_window_transformer.h"
10 #include "ash/shell.h" 11 #include "ash/shell.h"
11 #include "ui/aura/root_window_transformer.h"
12 #include "ui/gfx/point.h" 12 #include "ui/gfx/point.h"
13 13
14 namespace ash { 14 namespace ash {
15 namespace test { 15 namespace test {
16 16
17 const aura::WindowTreeHost* MirrorWindowTestApi::GetHost() const { 17 const aura::WindowTreeHost* MirrorWindowTestApi::GetHost() const {
18 return Shell::GetInstance()->display_controller()-> 18 aura::Window* window = Shell::GetInstance()
19 mirror_window_controller()->host_.get(); 19 ->display_controller()
20 ->mirror_window_controller()
21 ->GetWindow();
22 return window ? window->GetHost() : NULL;
20 } 23 }
21 24
22 int MirrorWindowTestApi::GetCurrentCursorType() const { 25 int MirrorWindowTestApi::GetCurrentCursorType() const {
23 return Shell::GetInstance()->display_controller()-> 26 return Shell::GetInstance()->display_controller()->
24 cursor_window_controller()->cursor_type_; 27 cursor_window_controller()->cursor_type_;
25 } 28 }
26 29
27 const gfx::Point& MirrorWindowTestApi::GetCursorHotPoint() const { 30 const gfx::Point& MirrorWindowTestApi::GetCursorHotPoint() const {
28 return Shell::GetInstance()->display_controller()-> 31 return Shell::GetInstance()->display_controller()->
29 cursor_window_controller()->hot_point_; 32 cursor_window_controller()->hot_point_;
30 } 33 }
31 34
32 const aura::Window* MirrorWindowTestApi::GetCursorWindow() const { 35 const aura::Window* MirrorWindowTestApi::GetCursorWindow() const {
33 return Shell::GetInstance()->display_controller()-> 36 return Shell::GetInstance()->display_controller()->
34 cursor_window_controller()->cursor_window_.get(); 37 cursor_window_controller()->cursor_window_.get();
35 } 38 }
36 39
37 scoped_ptr<aura::RootWindowTransformer> 40 scoped_ptr<RootWindowTransformer>
38 MirrorWindowTestApi::CreateCurrentRootWindowTransformer() const { 41 MirrorWindowTestApi::CreateCurrentRootWindowTransformer() const {
39 return Shell::GetInstance()->display_controller()-> 42 return Shell::GetInstance()->display_controller()->
40 mirror_window_controller()->CreateRootWindowTransformer(); 43 mirror_window_controller()->CreateRootWindowTransformer();
41 } 44 }
42 45
43 } // namespace test 46 } // namespace test
44 } // namespace ash 47 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/mirror_window_test_api.h ('k') | ash/test/test_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698