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

Unified Diff: services/ui/ws/user_display_manager.cc

Issue 2505133003: Mojo C++ bindings: switch part of the services/ui/public/interfaces mojom target to use STL types. (Closed)
Patch Set: Merge branch 'master' into c139_wrappers_ui 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 | « services/ui/public/interfaces/BUILD.gn ('k') | services/ui/ws/user_display_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/user_display_manager.cc
diff --git a/services/ui/ws/user_display_manager.cc b/services/ui/ws/user_display_manager.cc
index d70f833c262f268c3a1f69760c22fadb482c3994..68ce33a05f3ae0306656218774982fe09368587d 100644
--- a/services/ui/ws/user_display_manager.cc
+++ b/services/ui/ws/user_display_manager.cc
@@ -39,10 +39,10 @@ void UserDisplayManager::OnFrameDecorationValuesChanged() {
mojo::Array<mojom::WsDisplayPtr> displays = GetAllDisplays();
display_manager_observers_.ForAllPtrs(
[this, &displays](mojom::DisplayManagerObserver* observer) {
- observer->OnDisplaysChanged(displays.Clone());
+ observer->OnDisplaysChanged(displays.Clone().PassStorage());
});
if (test_observer_)
- test_observer_->OnDisplaysChanged(displays.Clone());
+ test_observer_->OnDisplaysChanged(displays.Clone().PassStorage());
}
void UserDisplayManager::AddDisplayManagerBinding(
@@ -59,10 +59,10 @@ void UserDisplayManager::OnDisplayUpdate(Display* display) {
display_manager_observers_.ForAllPtrs(
[&displays](mojom::DisplayManagerObserver* observer) {
- observer->OnDisplaysChanged(displays.Clone());
+ observer->OnDisplaysChanged(displays.Clone().PassStorage());
});
if (test_observer_)
- test_observer_->OnDisplaysChanged(displays.Clone());
+ test_observer_->OnDisplaysChanged(displays.Clone().PassStorage());
}
void UserDisplayManager::OnWillDestroyDisplay(Display* display) {
@@ -159,7 +159,7 @@ void UserDisplayManager::CallOnDisplays(
mojom::DisplayManagerObserver* observer) {
// TODO(kylechar): Pass internal display id to clients here.
observer->OnDisplays(
- GetAllDisplays(),
+ GetAllDisplays().PassStorage(),
display::PlatformScreen::GetInstance()->GetPrimaryDisplayId(),
display::Display::kInvalidDisplayID);
}
« no previous file with comments | « services/ui/public/interfaces/BUILD.gn ('k') | services/ui/ws/user_display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698