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

Side by Side Diff: ash/mus/wm/accelerator_registrar_impl.cc

Issue 1641003002: [exp] ash: Ash in Mus. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 4 years, 10 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/mus/wm/accelerator_registrar_impl.h ('k') | ash/mus/wm/main.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 "mash/wm/accelerator_registrar_impl.h" 5 #include "ash/mus/wm/accelerator_registrar_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "components/mus/public/interfaces/window_tree_host.mojom.h" 11 #include "components/mus/public/interfaces/window_tree_host.mojom.h"
12 12
13 namespace mash { 13 namespace ash {
14 namespace wm { 14 namespace muswm {
15 15
16 namespace { 16 namespace {
17 const int kAcceleratorIdMask = 0xffff; 17 const int kAcceleratorIdMask = 0xffff;
18 } 18 }
19 19
20 AcceleratorRegistrarImpl::AcceleratorRegistrarImpl( 20 AcceleratorRegistrarImpl::AcceleratorRegistrarImpl(
21 mus::mojom::WindowTreeHost* host, 21 mus::mojom::WindowTreeHost* host,
22 uint32_t accelerator_namespace, 22 uint32_t accelerator_namespace,
23 mojo::InterfaceRequest<AcceleratorRegistrar> request, 23 mojo::InterfaceRequest<AcceleratorRegistrar> request,
24 const DestroyCallback& destroy_callback) 24 const DestroyCallback& destroy_callback)
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return; 103 return;
104 host_->RemoveAccelerator(namespaced_accelerator_id); 104 host_->RemoveAccelerator(namespaced_accelerator_id);
105 accelerator_ids_.erase(namespaced_accelerator_id); 105 accelerator_ids_.erase(namespaced_accelerator_id);
106 // If the registrar is not bound anymore (i.e. the client can no longer 106 // If the registrar is not bound anymore (i.e. the client can no longer
107 // install new accelerators), and the last accelerator has been removed, then 107 // install new accelerators), and the last accelerator has been removed, then
108 // there's no point keeping this alive anymore. 108 // there's no point keeping this alive anymore.
109 if (accelerator_ids_.empty() && !binding_.is_bound()) 109 if (accelerator_ids_.empty() && !binding_.is_bound())
110 delete this; 110 delete this;
111 } 111 }
112 112
113 } // namespace wm 113 } // namespace muswm
114 } // namespace mash 114 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/wm/accelerator_registrar_impl.h ('k') | ash/mus/wm/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698