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

Unified Diff: ui/aura/test/test_screen.h

Issue 2207043002: SetDeviceScaleFactorForTest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SetDeviceScaleFactorForTest Created 4 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/test_screen.h
diff --git a/ui/aura/test/test_screen.h b/ui/aura/test/test_screen.h
index c5f0284a252b0ae932b823b22fe0f9bf5babca7b..44f54b7d1e968fe57e694f7f5e4bc4147136a5c1 100644
--- a/ui/aura/test/test_screen.h
+++ b/ui/aura/test/test_screen.h
@@ -5,10 +5,13 @@
#ifndef UI_AURA_TEST_TEST_SCREEN_H_
#define UI_AURA_TEST_TEST_SCREEN_H_
+#include <memory>
+
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "ui/aura/window_observer.h"
#include "ui/display/display.h"
+#include "ui/display/display_change_notifier.h"
#include "ui/display/screen.h"
namespace gfx {
@@ -18,6 +21,7 @@ class Transform;
}
namespace aura {
+//namespace test {
class Window;
class WindowTreeHost;
@@ -30,15 +34,18 @@ class TestScreen : public display::Screen, public WindowObserver {
static TestScreen* Create(const gfx::Size& size);
~TestScreen() override;
- WindowTreeHost* CreateHostForPrimaryDisplay();
+ void CreateHostForPrimaryDisplay();
+
+ aura::WindowTreeHost* host() { return host_.get(); }
- void SetDeviceScaleFactor(float device_scale_fator);
+ // void SetDeviceScaleFactor(float device_scale_fator);
void SetDisplayRotation(display::Display::Rotation rotation);
void SetUIScale(float ui_scale);
void SetWorkAreaInsets(const gfx::Insets& insets);
// display::Screen overrides:
display::Display GetPrimaryDisplay() const override;
+ void SetDeviceScaleFactorForTest(float scale_factor) override;
protected:
gfx::Transform GetRotationTransform() const;
@@ -48,7 +55,6 @@ class TestScreen : public display::Screen, public WindowObserver {
void OnWindowBoundsChanged(Window* window,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) override;
- void OnWindowDestroying(Window* window) override;
// display::Screen overrides:
gfx::Point GetCursorScreenPoint() override;
@@ -67,7 +73,9 @@ class TestScreen : public display::Screen, public WindowObserver {
private:
explicit TestScreen(const gfx::Rect& screen_bounds);
- aura::WindowTreeHost* host_;
+ display::DisplayChangeNotifier notifier_;
+
+ std::unique_ptr<aura::WindowTreeHost> host_;
display::Display display_;
@@ -75,7 +83,7 @@ class TestScreen : public display::Screen, public WindowObserver {
DISALLOW_COPY_AND_ASSIGN(TestScreen);
};
-
+//} // namespace test
} // namespace aura
#endif // UI_AURA_TEST_TEST_SCREEN_H_
« 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