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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/window_tree_host_impl.cc
diff --git a/components/mus/ws/window_tree_host_impl.cc b/components/mus/ws/window_tree_host_impl.cc
index 7360710d1e66021f04d47313a1bd18a1432f231d..fd4f6d70a9782056f9a75f09f77eff2a48700838 100644
--- a/components/mus/ws/window_tree_host_impl.cc
+++ b/components/mus/ws/window_tree_host_impl.cc
@@ -139,9 +139,12 @@ void WindowTreeHostImpl::SetTitle(const mojo::String& title) {
display_manager_->SetTitle(title.To<base::string16>());
}
-void WindowTreeHostImpl::AddAccelerator(uint32_t id,
- mojom::EventMatcherPtr event_matcher) {
- event_dispatcher_.AddAccelerator(id, event_matcher.Pass());
+void WindowTreeHostImpl::AddAccelerator(
+ uint32_t id,
+ mojom::EventMatcherPtr event_matcher,
+ const AddAcceleratorCallback& callback) {
+ bool success = event_dispatcher_.AddAccelerator(id, event_matcher.Pass());
+ callback.Run(success);
}
void WindowTreeHostImpl::RemoveAccelerator(uint32_t id) {
« 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