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

Side by Side Diff: components/mus/public/cpp/lib/window_tree_client_impl.cc

Issue 1953753002: Turn RootWindowController Menus Async (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « ash/root_window_controller.cc ('k') | ui/aura/client/default_capture_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h" 5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 190
191 void WindowTreeClientImpl::WaitForEmbed() { 191 void WindowTreeClientImpl::WaitForEmbed() {
192 DCHECK(roots_.empty()); 192 DCHECK(roots_.empty());
193 // OnEmbed() is the first function called. 193 // OnEmbed() is the first function called.
194 binding_.WaitForIncomingMethodCall(); 194 binding_.WaitForIncomingMethodCall();
195 // TODO(sky): deal with pipe being closed before we get OnEmbed(). 195 // TODO(sky): deal with pipe being closed before we get OnEmbed().
196 } 196 }
197 197
198 void WindowTreeClientImpl::DestroyWindow(Window* window) { 198 void WindowTreeClientImpl::DestroyWindow(Window* window) {
199 // TODO(jonross): Also clear the focused window (crbug.com/611983)
200 if (window == capture_window_) {
201 InFlightCaptureChange reset_change(this, nullptr);
202 ApplyServerChangeToExistingInFlightChange(reset_change);
203 // Normally just updating the queued changes is sufficient. However since
204 // |window| is being destroyed, it will not be possible to notify its
205 // observers
206 // of the lost capture. Update local state now.
207 LocalSetCapture(nullptr);
208 }
199 DCHECK(tree_); 209 DCHECK(tree_);
200 const uint32_t change_id = ScheduleInFlightChange(base::WrapUnique( 210 const uint32_t change_id = ScheduleInFlightChange(base::WrapUnique(
201 new CrashInFlightChange(window, ChangeType::DELETE_WINDOW))); 211 new CrashInFlightChange(window, ChangeType::DELETE_WINDOW)));
202 tree_->DeleteWindow(change_id, server_id(window)); 212 tree_->DeleteWindow(change_id, server_id(window));
203 } 213 }
204 214
205 void WindowTreeClientImpl::AddChild(Window* parent, Id child_id) { 215 void WindowTreeClientImpl::AddChild(Window* parent, Id child_id) {
206 DCHECK(tree_); 216 DCHECK(tree_);
207 const uint32_t change_id = ScheduleInFlightChange( 217 const uint32_t change_id = ScheduleInFlightChange(
208 base::WrapUnique(new CrashInFlightChange(parent, ChangeType::ADD_CHILD))); 218 base::WrapUnique(new CrashInFlightChange(parent, ChangeType::ADD_CHILD)));
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 1109
1100 void WindowTreeClientImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea( 1110 void WindowTreeClientImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea(
1101 Window* window, 1111 Window* window,
1102 const gfx::Vector2d& offset, 1112 const gfx::Vector2d& offset,
1103 const gfx::Insets& hit_area) { 1113 const gfx::Insets& hit_area) {
1104 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( 1114 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea(
1105 server_id(window), offset.x(), offset.y(), mojo::Insets::From(hit_area)); 1115 server_id(window), offset.x(), offset.y(), mojo::Insets::From(hit_area));
1106 } 1116 }
1107 1117
1108 } // namespace mus 1118 } // namespace mus
OLDNEW
« no previous file with comments | « ash/root_window_controller.cc ('k') | ui/aura/client/default_capture_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698