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

Unified Diff: services/ui/display/screen_manager_ozone_internal.h

Issue 2692863009: Remove usage of ws::Display in ws::UserDisplayManager. (Closed)
Patch Set: Fix mash_browser_tests. Created 3 years, 10 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
Index: services/ui/display/screen_manager_ozone_internal.h
diff --git a/services/ui/display/screen_manager_ozone_internal.h b/services/ui/display/screen_manager_ozone_internal.h
index 690c8df23b5134b19ec562332c7b2348f568f9d5..bb9abff09d09dff97bd0ab29518847449a833817 100644
--- a/services/ui/display/screen_manager_ozone_internal.h
+++ b/services/ui/display/screen_manager_ozone_internal.h
@@ -53,7 +53,6 @@ class ScreenManagerOzoneInternal
void AddInterfaces(service_manager::InterfaceRegistry* registry) override;
void Init(ScreenManagerDelegate* delegate) override;
void RequestCloseDisplay(int64_t display_id) override;
- int64_t GetPrimaryDisplayId() const override;
// mojom::TestDisplayController:
void ToggleAddRemoveDisplay() override;
@@ -109,7 +108,14 @@ class ScreenManagerOzoneInternal
std::unique_ptr<DisplayChangeObserver> display_change_observer_;
std::unique_ptr<TouchTransformController> touch_transform_controller_;
- ScreenBase* screen_ = nullptr;
+ // A Screen instance is created in the constructor because it might be
+ // accessed early. The ownership of this object will be transfered to
+ // |display_manager_| when that gets initialized.
+ std::unique_ptr<ScreenBase> screen_owned_;
+
+ // Used to add/remove/modify displays.
+ ScreenBase* screen_;
+
ScreenManagerDelegate* delegate_ = nullptr;
std::unique_ptr<NativeDisplayDelegate> native_display_delegate_;
« no previous file with comments | « services/ui/display/screen_manager_ozone_external.cc ('k') | services/ui/display/screen_manager_ozone_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698