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

Unified Diff: ui/display/test/test_screen.cc

Issue 2431473002: Change single-display screens to use ScreenBase and DisplayList. (Closed)
Patch Set: renderer test Created 4 years, 1 month 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/display/test/test_screen.h ('k') | ui/views/mus/screen_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/test/test_screen.cc
diff --git a/ui/display/test/test_screen.cc b/ui/display/test/test_screen.cc
index cd96e35b85c7dcd57f2049185d344c58b48b6725..7121d8b1c355edc74c707013daa6d547a2f0695d 100644
--- a/ui/display/test/test_screen.cc
+++ b/ui/display/test/test_screen.cc
@@ -10,10 +10,11 @@ namespace display {
namespace test {
TestScreen::TestScreen() {
+ display::Display display;
+ ProcessDisplayChanged(display, true /* is_primary */);
}
-TestScreen::~TestScreen() {
-}
+TestScreen::~TestScreen() {}
gfx::Point TestScreen::GetCursorScreenPoint() {
return gfx::Point();
@@ -27,34 +28,8 @@ gfx::NativeWindow TestScreen::GetWindowAtScreenPoint(const gfx::Point& point) {
return nullptr;
}
-int TestScreen::GetNumDisplays() const {
- return 1;
-}
-
-std::vector<Display> TestScreen::GetAllDisplays() const {
- return std::vector<Display>(1, display_);
-}
-
Display TestScreen::GetDisplayNearestWindow(gfx::NativeView view) const {
- return display_;
-}
-
-Display TestScreen::GetDisplayNearestPoint(const gfx::Point& point) const {
- return display_;
-}
-
-Display TestScreen::GetDisplayMatching(const gfx::Rect& match_rect) const {
- return display_;
-}
-
-Display TestScreen::GetPrimaryDisplay() const {
- return display_;
-}
-
-void TestScreen::AddObserver(DisplayObserver* observer) {
-}
-
-void TestScreen::RemoveObserver(DisplayObserver* observer) {
+ return GetPrimaryDisplay();
}
} // namespace test
« no previous file with comments | « ui/display/test/test_screen.h ('k') | ui/views/mus/screen_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698