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

Unified Diff: components/view_manager/event_dispatcher.h

Issue 1344573002: Mandoline: Rename components/view_manager to components/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 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/view_manager/display_manager_factory.h ('k') | components/view_manager/event_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/view_manager/event_dispatcher.h
diff --git a/components/view_manager/event_dispatcher.h b/components/view_manager/event_dispatcher.h
deleted file mode 100644
index 101dc002207007120f19f231d43ba2272a0fb7b5..0000000000000000000000000000000000000000
--- a/components/view_manager/event_dispatcher.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2015 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_VIEW_MANAGER_EVENT_DISPATCHER_H_
-#define COMPONENTS_VIEW_MANAGER_EVENT_DISPATCHER_H_
-
-#include <map>
-
-#include "base/basictypes.h"
-#include "ui/mojo/events/input_event_constants.mojom.h"
-#include "ui/mojo/events/input_events.mojom.h"
-#include "ui/mojo/events/input_key_codes.mojom.h"
-
-namespace view_manager {
-
-class ServerView;
-class ViewTreeHostImpl;
-
-// Handles dispatching events to the right location as well as updating focus.
-class EventDispatcher {
- public:
- explicit EventDispatcher(ViewTreeHostImpl* view_tree_host);
- ~EventDispatcher();
-
- void AddAccelerator(uint32_t id,
- mojo::KeyboardCode keyboard_code,
- mojo::EventFlags flags);
- void RemoveAccelerator(uint32_t id);
-
- void OnEvent(mojo::EventPtr event);
-
- private:
- struct Accelerator {
- Accelerator(mojo::KeyboardCode keyboard_code, mojo::EventFlags flags)
- : keyboard_code(keyboard_code), flags(flags) {}
-
- // So we can use this in a set.
- bool operator<(const Accelerator& other) const {
- if (keyboard_code == other.keyboard_code)
- return flags < other.flags;
- return keyboard_code < other.keyboard_code;
- }
-
- mojo::KeyboardCode keyboard_code;
- mojo::EventFlags flags;
- };
-
- // Looks to see if there is an accelerator bound to the specified code/flags.
- // If there is one, sets |accelerator_id| to the id of the accelerator invoked
- // and returns true. If there is none, returns false so normal key event
- // processing can continue.
- bool FindAccelerator(const mojo::Event& event, uint32_t* accelerator_id);
-
- // Returns the ServerView that should receive |event|. If |event| is a
- // pointer-type event, then this function also updates the event location to
- // make sure it is in the returned target's coordinate space.
- ServerView* FindEventTarget(mojo::Event* event);
-
- ViewTreeHostImpl* view_tree_host_;
-
- using Entry = std::pair<uint32_t, Accelerator>;
- std::map<uint32_t, Accelerator> accelerators_;
-
- DISALLOW_COPY_AND_ASSIGN(EventDispatcher);
-};
-
-} // namespace view_manager
-
-#endif // COMPONENTS_VIEW_MANAGER_EVENT_DISPATCHER_H_
« no previous file with comments | « components/view_manager/display_manager_factory.h ('k') | components/view_manager/event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698