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

Unified Diff: components/mus/ws/accelerator.h

Issue 2119963002: Move mus to //services/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 | « components/mus/ws/BUILD.gn ('k') | components/mus/ws/accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/accelerator.h
diff --git a/components/mus/ws/accelerator.h b/components/mus/ws/accelerator.h
deleted file mode 100644
index 2113ad1ec9b05856b66f5c317fa2eebef60e8c60..0000000000000000000000000000000000000000
--- a/components/mus/ws/accelerator.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_MUS_WS_ACCELERATOR_H_
-#define COMPONENTS_MUS_WS_ACCELERATOR_H_
-
-#include <stdint.h>
-
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "components/mus/public/interfaces/event_matcher.mojom.h"
-#include "components/mus/ws/event_matcher.h"
-
-namespace ui {
-class Event;
-}
-
-namespace mus {
-namespace ws {
-
-// An Accelerator encompasses an id defined by the client, along with a unique
-// mojom::EventMatcher. See WindowManagerClient.
-//
-// This provides a WeakPtr, as the client might delete the accelerator between
-// an event having been matched and the dispatch of the accelerator to the
-// client.
-class Accelerator {
- public:
- Accelerator(uint32_t id, const mojom::EventMatcher& matcher);
- ~Accelerator();
-
- // Returns true if |event| and |phase | matches the definition in the
- // mojom::EventMatcher used for initialization.
- bool MatchesEvent(const ui::Event& event,
- const ui::mojom::AcceleratorPhase phase) const;
-
- // Returns true if |other| was created with an identical mojom::EventMatcher.
- bool EqualEventMatcher(const Accelerator* other) const;
-
- base::WeakPtr<Accelerator> GetWeakPtr() { return weak_factory_.GetWeakPtr(); }
-
- uint32_t id() const { return id_; }
-
- private:
- uint32_t id_;
- ui::mojom::AcceleratorPhase accelerator_phase_;
- EventMatcher event_matcher_;
- base::WeakPtrFactory<Accelerator> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(Accelerator);
-};
-
-} // namespace ws
-} // namespace mus
-
-#endif // COMPONENTS_MUS_WS_ACCELERATOR_H_
« no previous file with comments | « components/mus/ws/BUILD.gn ('k') | components/mus/ws/accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698