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

Side by Side Diff: components/mus/ws/window_tree_host_impl.cc

Issue 1487333004: mus: Notify the client whether adding an accelerator was successful. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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 | « components/mus/ws/window_tree_host_impl.h ('k') | mandoline/ui/desktop_ui/browser_window.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ws/window_tree_host_impl.h" 5 #include "components/mus/ws/window_tree_host_impl.h"
6 6
7 #include "base/debug/debugger.h" 7 #include "base/debug/debugger.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "components/mus/common/types.h" 9 #include "components/mus/common/types.h"
10 #include "components/mus/ws/connection_manager.h" 10 #include "components/mus/ws/connection_manager.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 132 }
133 133
134 void WindowTreeHostImpl::SetSize(mojo::SizePtr size) { 134 void WindowTreeHostImpl::SetSize(mojo::SizePtr size) {
135 display_manager_->SetViewportSize(size.To<gfx::Size>()); 135 display_manager_->SetViewportSize(size.To<gfx::Size>());
136 } 136 }
137 137
138 void WindowTreeHostImpl::SetTitle(const mojo::String& title) { 138 void WindowTreeHostImpl::SetTitle(const mojo::String& title) {
139 display_manager_->SetTitle(title.To<base::string16>()); 139 display_manager_->SetTitle(title.To<base::string16>());
140 } 140 }
141 141
142 void WindowTreeHostImpl::AddAccelerator(uint32_t id, 142 void WindowTreeHostImpl::AddAccelerator(
143 mojom::EventMatcherPtr event_matcher) { 143 uint32_t id,
144 event_dispatcher_.AddAccelerator(id, event_matcher.Pass()); 144 mojom::EventMatcherPtr event_matcher,
145 const AddAcceleratorCallback& callback) {
146 bool success = event_dispatcher_.AddAccelerator(id, event_matcher.Pass());
147 callback.Run(success);
145 } 148 }
146 149
147 void WindowTreeHostImpl::RemoveAccelerator(uint32_t id) { 150 void WindowTreeHostImpl::RemoveAccelerator(uint32_t id) {
148 event_dispatcher_.RemoveAccelerator(id); 151 event_dispatcher_.RemoveAccelerator(id);
149 } 152 }
150 153
151 void WindowTreeHostImpl::AddActivationParent(uint32_t window_id) { 154 void WindowTreeHostImpl::AddActivationParent(uint32_t window_id) {
152 ServerWindow* window = 155 ServerWindow* window =
153 connection_manager_->GetWindow(WindowIdFromTransportId(window_id)); 156 connection_manager_->GetWindow(WindowIdFromTransportId(window_id));
154 if (window) 157 if (window)
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 &WindowTreeHostImpl::OnEventAckTimeout); 385 &WindowTreeHostImpl::OnEventAckTimeout);
383 } 386 }
384 387
385 void WindowTreeHostImpl::OnWindowDestroyed(ServerWindow* window) { 388 void WindowTreeHostImpl::OnWindowDestroyed(ServerWindow* window) {
386 windows_needing_frame_destruction_.erase(window); 389 windows_needing_frame_destruction_.erase(window);
387 window->RemoveObserver(this); 390 window->RemoveObserver(this);
388 } 391 }
389 392
390 } // namespace ws 393 } // namespace ws
391 } // namespace mus 394 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/window_tree_host_impl.h ('k') | mandoline/ui/desktop_ui/browser_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698