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

Unified Diff: ash/mus/test/wm_test_screen.cc

Issue 2314203002: Move DisplayList to display; add ScreenBase. (Closed)
Patch Set: Update unit test namespace. Created 4 years, 3 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 | « ash/mus/test/wm_test_screen.h ('k') | ash/mus/window_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/test/wm_test_screen.cc
diff --git a/ash/mus/test/wm_test_screen.cc b/ash/mus/test/wm_test_screen.cc
index ba51b815c400f859f9e2c5c51c957a5c1f182bef..684713b3635dfff32808d214e884ef793dd4a101 100644
--- a/ash/mus/test/wm_test_screen.cc
+++ b/ash/mus/test/wm_test_screen.cc
@@ -7,24 +7,15 @@
#include "ui/aura/window.h"
#include "ui/display/display_finder.h"
-#undef NOTIMPLEMENTED
-#define NOTIMPLEMENTED() DVLOG(1) << "notimplemented"
-
namespace ash {
namespace mus {
-WmTestScreen::WmTestScreen() {
- display::Screen::SetScreenInstance(this);
-}
-
-WmTestScreen::~WmTestScreen() {
- if (display::Screen::GetScreen() == this)
- display::Screen::SetScreenInstance(nullptr);
-}
+WmTestScreen::WmTestScreen() {}
+WmTestScreen::~WmTestScreen() {}
gfx::Point WmTestScreen::GetCursorScreenPoint() {
// TODO(sky): use the implementation from WindowManagerConnection.
- NOTIMPLEMENTED();
+ DVLOG(1) << "NOTIMPLEMENTED";
return gfx::Point();
}
@@ -36,49 +27,5 @@ bool WmTestScreen::IsWindowUnderCursor(gfx::NativeWindow window) {
window->GetBoundsInScreen().Contains(GetCursorScreenPoint());
}
-gfx::NativeWindow WmTestScreen::GetWindowAtScreenPoint(
- const gfx::Point& point) {
- NOTREACHED();
- return nullptr;
-}
-
-display::Display WmTestScreen::GetPrimaryDisplay() const {
- return *display_list_.GetPrimaryDisplayIterator();
-}
-
-display::Display WmTestScreen::GetDisplayNearestWindow(
- gfx::NativeView view) const {
- NOTIMPLEMENTED();
- return *display_list_.GetPrimaryDisplayIterator();
-}
-
-display::Display WmTestScreen::GetDisplayNearestPoint(
- const gfx::Point& point) const {
- return *display::FindDisplayNearestPoint(display_list_.displays(), point);
-}
-
-int WmTestScreen::GetNumDisplays() const {
- return static_cast<int>(display_list_.displays().size());
-}
-
-std::vector<display::Display> WmTestScreen::GetAllDisplays() const {
- return display_list_.displays();
-}
-
-display::Display WmTestScreen::GetDisplayMatching(
- const gfx::Rect& match_rect) const {
- const display::Display* match = display::FindDisplayWithBiggestIntersection(
- display_list_.displays(), match_rect);
- return match ? *match : GetPrimaryDisplay();
-}
-
-void WmTestScreen::AddObserver(display::DisplayObserver* observer) {
- display_list_.AddObserver(observer);
-}
-
-void WmTestScreen::RemoveObserver(display::DisplayObserver* observer) {
- display_list_.RemoveObserver(observer);
-}
-
} // namespace mus
} // namespace ash
« no previous file with comments | « ash/mus/test/wm_test_screen.h ('k') | ash/mus/window_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698