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

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

Issue 465803002: Make the minimized home card not overlap activities on Athena (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed sadrul@'s comments + rebased Created 6 years, 4 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 | « extensions/shell/browser/shell_desktop_controller.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 Insets;
14 class Rect; 15 class Rect;
15 class Transform; 16 class Transform;
16 } 17 }
17 18
18 namespace aura { 19 namespace aura {
19 class Window; 20 class Window;
20 class WindowTreeHost; 21 class WindowTreeHost;
21 22
22 // A minimal, testing Aura implementation of gfx::Screen. 23 // A minimal, testing Aura implementation of gfx::Screen.
23 class TestScreen : public gfx::Screen, 24 class TestScreen : public gfx::Screen,
24 public WindowObserver { 25 public WindowObserver {
25 public: 26 public:
26 // Creates a gfx::Screen of the specified size. If no size is specified, then 27 // Creates a gfx::Screen of the specified size. If no size is specified, then
27 // creates a 800x600 screen. |size| is in physical pixels. 28 // creates a 800x600 screen. |size| is in physical pixels.
28 static TestScreen* Create(const gfx::Size& size); 29 static TestScreen* Create(const gfx::Size& size);
29 // Creates a TestScreen that uses fullscreen for the display. 30 // Creates a TestScreen that uses fullscreen for the display.
30 static TestScreen* CreateFullscreen(); 31 static TestScreen* CreateFullscreen();
31 virtual ~TestScreen(); 32 virtual ~TestScreen();
32 33
33 WindowTreeHost* CreateHostForPrimaryDisplay(); 34 WindowTreeHost* CreateHostForPrimaryDisplay();
34 35
35 void SetDeviceScaleFactor(float device_scale_fator); 36 void SetDeviceScaleFactor(float device_scale_fator);
36 void SetDisplayRotation(gfx::Display::Rotation rotation); 37 void SetDisplayRotation(gfx::Display::Rotation rotation);
37 void SetUIScale(float ui_scale); 38 void SetUIScale(float ui_scale);
39 void SetWorkAreaInsets(const gfx::Insets& insets);
38 40
39 protected: 41 protected:
40 gfx::Transform GetRotationTransform() const; 42 gfx::Transform GetRotationTransform() const;
41 gfx::Transform GetUIScaleTransform() const; 43 gfx::Transform GetUIScaleTransform() const;
42 44
43 // WindowObserver overrides: 45 // WindowObserver overrides:
44 virtual void OnWindowBoundsChanged(Window* window, 46 virtual void OnWindowBoundsChanged(Window* window,
45 const gfx::Rect& old_bounds, 47 const gfx::Rect& old_bounds,
46 const gfx::Rect& new_bounds) OVERRIDE; 48 const gfx::Rect& new_bounds) OVERRIDE;
47 virtual void OnWindowDestroying(Window* window) OVERRIDE; 49 virtual void OnWindowDestroying(Window* window) OVERRIDE;
(...skipping 24 matching lines...) Expand all
72 gfx::Display display_; 74 gfx::Display display_;
73 75
74 float ui_scale_; 76 float ui_scale_;
75 77
76 DISALLOW_COPY_AND_ASSIGN(TestScreen); 78 DISALLOW_COPY_AND_ASSIGN(TestScreen);
77 }; 79 };
78 80
79 } // namespace aura 81 } // namespace aura
80 82
81 #endif // UI_AURA_TEST_TEST_SCREEN_H_ 83 #endif // UI_AURA_TEST_TEST_SCREEN_H_
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_desktop_controller.cc ('k') | ui/aura/test/test_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698