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

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

Issue 273073002: Changes code using Compositor to pass in ContextFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tooltip on chromeos Created 6 years, 7 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/aura_test_helper.cc ('k') | ui/aura/test/test_screen.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) 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 UI_AURA_TEST_TEST_SCREEN_H_ 5 #ifndef UI_AURA_TEST_TEST_SCREEN_H_
6 #define UI_AURA_TEST_TEST_SCREEN_H_ 6 #define UI_AURA_TEST_TEST_SCREEN_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ui/aura/window_observer.h" 9 #include "ui/aura/window_observer.h"
10 #include "ui/gfx/display.h" 10 #include "ui/gfx/display.h"
11 #include "ui/gfx/screen.h" 11 #include "ui/gfx/screen.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class Rect; 14 class Rect;
15 class Transform; 15 class Transform;
16 } 16 }
17 17
18 namespace ui {
19 class ContextFactory;
20 }
21
18 namespace aura { 22 namespace aura {
19 class Window; 23 class Window;
20 class WindowTreeHost; 24 class WindowTreeHost;
21 25
22 // A minimal, testing Aura implementation of gfx::Screen. 26 // A minimal, testing Aura implementation of gfx::Screen.
23 class TestScreen : public gfx::Screen, 27 class TestScreen : public gfx::Screen,
24 public WindowObserver { 28 public WindowObserver {
25 public: 29 public:
26 static TestScreen* Create(); 30 static TestScreen* Create();
27 // Creates a TestScreen that uses fullscreen for the display. 31 // Creates a TestScreen that uses fullscreen for the display.
28 static TestScreen* CreateFullscreen(); 32 static TestScreen* CreateFullscreen();
29 virtual ~TestScreen(); 33 virtual ~TestScreen();
30 34
31 WindowTreeHost* CreateHostForPrimaryDisplay(); 35 WindowTreeHost* CreateHostForPrimaryDisplay(
36 ui::ContextFactory* context_factory);
32 37
33 void SetDeviceScaleFactor(float device_scale_fator); 38 void SetDeviceScaleFactor(float device_scale_fator);
34 void SetDisplayRotation(gfx::Display::Rotation rotation); 39 void SetDisplayRotation(gfx::Display::Rotation rotation);
35 void SetUIScale(float ui_scale); 40 void SetUIScale(float ui_scale);
36 41
37 protected: 42 protected:
38 gfx::Transform GetRotationTransform() const; 43 gfx::Transform GetRotationTransform() const;
39 gfx::Transform GetUIScaleTransform() const; 44 gfx::Transform GetUIScaleTransform() const;
40 45
41 // WindowObserver overrides: 46 // WindowObserver overrides:
(...skipping 28 matching lines...) Expand all
70 gfx::Display display_; 75 gfx::Display display_;
71 76
72 float ui_scale_; 77 float ui_scale_;
73 78
74 DISALLOW_COPY_AND_ASSIGN(TestScreen); 79 DISALLOW_COPY_AND_ASSIGN(TestScreen);
75 }; 80 };
76 81
77 } // namespace aura 82 } // namespace aura
78 83
79 #endif // UI_AURA_TEST_TEST_SCREEN_H_ 84 #endif // UI_AURA_TEST_TEST_SCREEN_H_
OLDNEW
« no previous file with comments | « ui/aura/test/aura_test_helper.cc ('k') | ui/aura/test/test_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698