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

Unified Diff: ui/display/screen_base.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/screen_base.h ('k') | ui/display/test/test_screen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/screen_base.cc
diff --git a/ui/display/screen_base.cc b/ui/display/screen_base.cc
index 67cb6038b3bdc2d5428304ed71986a59ab55aca3..2b84e1a52c13547540af94d9063f50ccffe9a430 100644
--- a/ui/display/screen_base.cc
+++ b/ui/display/screen_base.cc
@@ -12,28 +12,9 @@
namespace display {
-ScreenBase::ScreenBase() {
- Screen::SetScreenInstance(this);
-}
-
-ScreenBase::~ScreenBase() {
- DCHECK_EQ(this, Screen::GetScreen());
- Screen::SetScreenInstance(nullptr);
-}
+ScreenBase::ScreenBase() {}
-void ScreenBase::ProcessDisplayChanged(const Display& changed_display,
- bool is_primary) {
- if (display_list_.FindDisplayById(changed_display.id()) ==
- display_list_.displays().end()) {
- display_list_.AddDisplay(changed_display,
- is_primary ? DisplayList::Type::PRIMARY
- : DisplayList::Type::NOT_PRIMARY);
- return;
- }
- display_list_.UpdateDisplay(
- changed_display,
- is_primary ? DisplayList::Type::PRIMARY : DisplayList::Type::NOT_PRIMARY);
-}
+ScreenBase::~ScreenBase() {}
gfx::Point ScreenBase::GetCursorScreenPoint() {
NOTIMPLEMENTED();
@@ -88,4 +69,18 @@ void ScreenBase::RemoveObserver(DisplayObserver* observer) {
display_list_.RemoveObserver(observer);
}
+void ScreenBase::ProcessDisplayChanged(const Display& changed_display,
+ bool is_primary) {
+ if (display_list_.FindDisplayById(changed_display.id()) ==
+ display_list_.displays().end()) {
+ display_list_.AddDisplay(changed_display,
+ is_primary ? DisplayList::Type::PRIMARY
+ : DisplayList::Type::NOT_PRIMARY);
+ return;
+ }
+ display_list_.UpdateDisplay(
+ changed_display,
+ is_primary ? DisplayList::Type::PRIMARY : DisplayList::Type::NOT_PRIMARY);
+}
+
} // namespace display
« no previous file with comments | « ui/display/screen_base.h ('k') | ui/display/test/test_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698