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

Unified Diff: ash/mus/accelerator_registrar_impl.cc

Issue 2029883002: Moves mash/wm into ash/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_static_assert
Patch Set: move comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/accelerator_registrar_impl.h ('k') | ash/mus/accelerator_registrar_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/accelerator_registrar_impl.cc
diff --git a/mash/wm/accelerator_registrar_impl.cc b/ash/mus/accelerator_registrar_impl.cc
similarity index 89%
rename from mash/wm/accelerator_registrar_impl.cc
rename to ash/mus/accelerator_registrar_impl.cc
index 1e2df773d3e59830c4a1f1b734c4ee198d0025b9..ee58053db02c4840f878d51de5fe52f1d8dc1a8d 100644
--- a/mash/wm/accelerator_registrar_impl.cc
+++ b/ash/mus/accelerator_registrar_impl.cc
@@ -2,26 +2,26 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "mash/wm/accelerator_registrar_impl.h"
+#include "ash/mus/accelerator_registrar_impl.h"
#include <stdint.h>
#include <utility>
+#include "ash/mus/root_window_controller.h"
+#include "ash/mus/window_manager.h"
+#include "ash/mus/window_manager_application.h"
#include "base/bind.h"
#include "components/mus/public/cpp/window_manager_delegate.h"
-#include "mash/wm/root_window_controller.h"
-#include "mash/wm/window_manager.h"
-#include "mash/wm/window_manager_application.h"
-namespace mash {
-namespace wm {
+namespace ash {
+namespace mus {
namespace {
const int kAcceleratorIdMask = 0xffff;
void OnAcceleratorAdded(bool result) {}
void CallAddAcceleratorCallback(
- const mus::mojom::AcceleratorRegistrar::AddAcceleratorCallback& callback,
+ const ::mus::mojom::AcceleratorRegistrar::AddAcceleratorCallback& callback,
bool result) {
callback.Run(result);
}
@@ -29,7 +29,7 @@ void CallAddAcceleratorCallback(
} // namespace
struct AcceleratorRegistrarImpl::Accelerator {
- mus::mojom::EventMatcherPtr event_matcher;
+ ::mus::mojom::EventMatcherPtr event_matcher;
AddAcceleratorCallback callback;
bool callback_used = false;
};
@@ -56,8 +56,9 @@ bool AcceleratorRegistrarImpl::OwnsAccelerator(uint32_t accelerator_id) const {
return !!accelerators_.count(accelerator_id);
}
-void AcceleratorRegistrarImpl::ProcessAccelerator(uint32_t accelerator_id,
- mus::mojom::EventPtr event) {
+void AcceleratorRegistrarImpl::ProcessAccelerator(
+ uint32_t accelerator_id,
+ ::mus::mojom::EventPtr event) {
DCHECK(OwnsAccelerator(accelerator_id));
accelerator_handler_->OnAccelerator(accelerator_id & kAcceleratorIdMask,
std::move(event));
@@ -120,7 +121,7 @@ void AcceleratorRegistrarImpl::RemoveAllAccelerators() {
}
void AcceleratorRegistrarImpl::SetHandler(
- mus::mojom::AcceleratorHandlerPtr handler) {
+ ::mus::mojom::AcceleratorHandlerPtr handler) {
accelerator_handler_ = std::move(handler);
accelerator_handler_.set_connection_error_handler(base::Bind(
&AcceleratorRegistrarImpl::OnHandlerGone, base::Unretained(this)));
@@ -128,7 +129,7 @@ void AcceleratorRegistrarImpl::SetHandler(
void AcceleratorRegistrarImpl::AddAccelerator(
uint32_t accelerator_id,
- mus::mojom::EventMatcherPtr matcher,
+ ::mus::mojom::EventMatcherPtr matcher,
const AddAcceleratorCallback& callback) {
if (!accelerator_handler_ ||
(accelerator_id & kAcceleratorIdMask) != accelerator_id) {
@@ -167,5 +168,5 @@ void AcceleratorRegistrarImpl::OnRootWindowControllerAdded(
AddAcceleratorToRoot(controller, pair.first);
}
-} // namespace wm
-} // namespace mash
+} // namespace mus
+} // namespace ash
« no previous file with comments | « ash/mus/accelerator_registrar_impl.h ('k') | ash/mus/accelerator_registrar_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698