| Index: ui/display/screen_base.h
|
| diff --git a/ash/mus/test/wm_test_screen.h b/ui/display/screen_base.h
|
| similarity index 54%
|
| copy from ash/mus/test/wm_test_screen.h
|
| copy to ui/display/screen_base.h
|
| index 4545804432cde15ca228e7a0671d05aed92744cc..e0c5b1c2ecf96b63c800be5a1e638b79dcaad57e 100644
|
| --- a/ash/mus/test/wm_test_screen.h
|
| +++ b/ui/display/screen_base.h
|
| @@ -2,24 +2,29 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef ASH_MUS_TEST_WM_TEST_SCREEN_H_
|
| -#define ASH_MUS_TEST_WM_TEST_SCREEN_H_
|
| +#ifndef UI_DISPLAY_SCREEN_BASE_H_
|
| +#define UI_DISPLAY_SCREEN_BASE_H_
|
|
|
| +#include "ui/display/display.h"
|
| +#include "ui/display/display_export.h"
|
| +#include "ui/display/display_list.h"
|
| #include "ui/display/screen.h"
|
| -#include "ui/views/mus/display_list.h"
|
|
|
| -namespace ash {
|
| -namespace mus {
|
| +namespace display {
|
|
|
| -// Screen implementation used by tests for the windowmanager. Does not talk
|
| -// to mus. Tests must keep the list of Displays in sync manually.
|
| -class WmTestScreen : public display::Screen {
|
| +// Simple screen implementation with a display list.
|
| +class DISPLAY_EXPORT ScreenBase : public display::Screen {
|
| public:
|
| - WmTestScreen();
|
| - ~WmTestScreen() override;
|
| + ScreenBase();
|
| + ~ScreenBase() override;
|
|
|
| - const views::DisplayList& display_list() const { return display_list_; }
|
| - views::DisplayList* display_list() { return &display_list_; }
|
| + display::DisplayList* display_list() { return &display_list_; };
|
| +
|
| + protected:
|
| + // Invoked when a display changed in some way, including being added.
|
| + // If |is_primary| is true, |changed_display| is the primary display.
|
| + void ProcessDisplayChanged(const display::Display& changed_display,
|
| + bool is_primary);
|
|
|
| private:
|
| // display::Screen:
|
| @@ -37,12 +42,11 @@ class WmTestScreen : public display::Screen {
|
| void AddObserver(display::DisplayObserver* observer) override;
|
| void RemoveObserver(display::DisplayObserver* observer) override;
|
|
|
| - views::DisplayList display_list_;
|
| + display::DisplayList display_list_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(WmTestScreen);
|
| + DISALLOW_COPY_AND_ASSIGN(ScreenBase);
|
| };
|
|
|
| -} // namespace mus
|
| -} // namespace ash
|
| +} // namespace display
|
|
|
| -#endif // ASH_MUS_TEST_WM_TEST_SCREEN_H_
|
| +#endif // UI_DISPLAY_SCREEN_BASE_H_
|
|
|