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

Unified Diff: ui/aura/mus/window_tree_client.cc

Issue 2904993003: chromeos: changes how DisplayManagerObservers are notified (Closed)
Patch Set: cleanup Created 3 years, 7 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 | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/test/mus/test_window_manager_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_client.cc
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc
index 5b3a58f696fa361a9f21517635a41b0193b70ae6..0b93d12151ebe0240ab582e39b457574bb7d4f01 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -193,6 +193,12 @@ void DispatchEventToTarget(ui::Event* event, WindowMus* target) {
GetWindowTreeHostMus(target)->SendEventToSink(event);
}
+// Use for acks from mus that are expected to always succeed and if they don't
+// a crash is triggered.
+void OnAckMustSucceed(bool success) {
+ CHECK(success);
+}
+
} // namespace
WindowTreeClient::WindowTreeClient(
@@ -1869,6 +1875,18 @@ void WindowTreeClient::RequestClose(Window* window) {
window_manager_client_->WmRequestClose(WindowMus::Get(window)->server_id());
}
+void WindowTreeClient::SetDisplayConfiguration(
+ const std::vector<display::Display>& displays,
+ std::vector<ui::mojom::WmViewportMetricsPtr> viewport_metrics,
+ int64_t primary_display_id) {
+ DCHECK_EQ(displays.size(), viewport_metrics.size());
+ if (window_manager_client_) {
+ window_manager_client_->SetDisplayConfiguration(
+ displays, std::move(viewport_metrics), primary_display_id,
+ base::Bind(&OnAckMustSucceed));
+ }
+}
+
void WindowTreeClient::OnWindowTreeHostBoundsWillChange(
WindowTreeHostMus* window_tree_host,
const gfx::Rect& bounds) {
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/test/mus/test_window_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698