| Index: headless/lib/browser/headless_screen.h
|
| diff --git a/ui/aura/test/test_screen.h b/headless/lib/browser/headless_screen.h
|
| similarity index 71%
|
| copy from ui/aura/test/test_screen.h
|
| copy to headless/lib/browser/headless_screen.h
|
| index 03cb4107e1e5f8404c67a8f62f6fceb8b4da4050..c6b6b3be01b740d3a77687123c787c64bb5996da 100644
|
| --- a/ui/aura/test/test_screen.h
|
| +++ b/headless/lib/browser/headless_screen.h
|
| @@ -1,9 +1,9 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef UI_AURA_TEST_TEST_SCREEN_H_
|
| -#define UI_AURA_TEST_TEST_SCREEN_H_
|
| +#ifndef HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_
|
| +#define HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_
|
|
|
| #include "base/compiler_specific.h"
|
| #include "base/macros.h"
|
| @@ -20,18 +20,18 @@ class Transform;
|
| namespace aura {
|
| class Window;
|
| class WindowTreeHost;
|
| +}
|
| +
|
| +namespace headless {
|
|
|
| -// A minimal, testing Aura implementation of gfx::Screen.
|
| -// TODO(bruthig): Consider extending gfx::test::TestScreen.
|
| -class TestScreen : public gfx::Screen,
|
| - public WindowObserver {
|
| +class HeadlessScreen : public gfx::Screen, public aura::WindowObserver {
|
| public:
|
| // Creates a gfx::Screen of the specified size. If no size is specified, then
|
| // creates a 800x600 screen. |size| is in physical pixels.
|
| - static TestScreen* Create(const gfx::Size& size);
|
| - ~TestScreen() override;
|
| + static HeadlessScreen* Create(const gfx::Size& size);
|
| + ~HeadlessScreen() override;
|
|
|
| - WindowTreeHost* CreateHostForPrimaryDisplay();
|
| + aura::WindowTreeHost* CreateHostForPrimaryDisplay();
|
|
|
| void SetDeviceScaleFactor(float device_scale_fator);
|
| void SetDisplayRotation(gfx::Display::Rotation rotation);
|
| @@ -43,10 +43,10 @@ class TestScreen : public gfx::Screen,
|
| gfx::Transform GetUIScaleTransform() const;
|
|
|
| // WindowObserver overrides:
|
| - void OnWindowBoundsChanged(Window* window,
|
| + void OnWindowBoundsChanged(aura::Window* window,
|
| const gfx::Rect& old_bounds,
|
| const gfx::Rect& new_bounds) override;
|
| - void OnWindowDestroying(Window* window) override;
|
| + void OnWindowDestroying(aura::Window* window) override;
|
|
|
| // gfx::Screen overrides:
|
| gfx::Point GetCursorScreenPoint() override;
|
| @@ -62,17 +62,15 @@ class TestScreen : public gfx::Screen,
|
| void RemoveObserver(gfx::DisplayObserver* observer) override;
|
|
|
| private:
|
| - explicit TestScreen(const gfx::Rect& screen_bounds);
|
| + explicit HeadlessScreen(const gfx::Rect& screen_bounds);
|
|
|
| aura::WindowTreeHost* host_;
|
| -
|
| gfx::Display display_;
|
| -
|
| float ui_scale_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(TestScreen);
|
| + DISALLOW_COPY_AND_ASSIGN(HeadlessScreen);
|
| };
|
|
|
| -} // namespace aura
|
| +} // namespace headless
|
|
|
| -#endif // UI_AURA_TEST_TEST_SCREEN_H_
|
| +#endif // HEADLESS_LIB_BROWSER_HEADLESS_SCREEN_H_
|
|
|