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

Side by Side Diff: services/window_manager/native_viewport_event_dispatcher_impl.h

Issue 924653002: Use StrongBinding instead of InterfaceImpl in wm event dispatcher (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « no previous file | services/window_manager/native_viewport_event_dispatcher_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef SERVICES_WINDOW_MANAGER_NATIVE_VIEWPORT_EVENT_DISPATCHER_IMPL_H_ 5 #ifndef SERVICES_WINDOW_MANAGER_NATIVE_VIEWPORT_EVENT_DISPATCHER_IMPL_H_
6 #define SERVICES_WINDOW_MANAGER_NATIVE_VIEWPORT_EVENT_DISPATCHER_IMPL_H_ 6 #define SERVICES_WINDOW_MANAGER_NATIVE_VIEWPORT_EVENT_DISPATCHER_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "mojo/public/cpp/bindings/strong_binding.h"
9 #include "mojo/services/native_viewport/public/interfaces/native_viewport.mojom. h" 10 #include "mojo/services/native_viewport/public/interfaces/native_viewport.mojom. h"
10 #include "ui/events/event_source.h" 11 #include "ui/events/event_source.h"
11 12
12 namespace window_manager { 13 namespace window_manager {
13 14
14 class WindowManagerApp; 15 class WindowManagerApp;
15 16
16 class NativeViewportEventDispatcherImpl 17 class NativeViewportEventDispatcherImpl
17 : public ui::EventSource, 18 : public ui::EventSource,
18 public mojo::InterfaceImpl<mojo::NativeViewportEventDispatcher> { 19 public mojo::NativeViewportEventDispatcher {
19 public: 20 public:
20 explicit NativeViewportEventDispatcherImpl(WindowManagerApp* app); 21 NativeViewportEventDispatcherImpl(
22 WindowManagerApp* app,
23 mojo::InterfaceRequest<mojo::NativeViewportEventDispatcher> request);
21 ~NativeViewportEventDispatcherImpl() override; 24 ~NativeViewportEventDispatcherImpl() override;
22 25
23 private: 26 private:
24 // ui::EventSource: 27 // ui::EventSource:
25 ui::EventProcessor* GetEventProcessor() override; 28 ui::EventProcessor* GetEventProcessor() override;
26 29
27 // NativeViewportEventDispatcher: 30 // NativeViewportEventDispatcher:
28 void OnEvent(mojo::EventPtr event, 31 void OnEvent(mojo::EventPtr event,
29 const mojo::Callback<void()>& callback) override; 32 const mojo::Callback<void()>& callback) override;
30 33
31 WindowManagerApp* app_; 34 WindowManagerApp* app_;
32 35
36 mojo::StrongBinding<mojo::NativeViewportEventDispatcher> binding_;
33 DISALLOW_COPY_AND_ASSIGN(NativeViewportEventDispatcherImpl); 37 DISALLOW_COPY_AND_ASSIGN(NativeViewportEventDispatcherImpl);
34 }; 38 };
35 39
36 } // namespace window_manager 40 } // namespace window_manager
37 41
38 #endif // SERVICES_WINDOW_MANAGER_NATIVE_VIEWPORT_EVENT_DISPATCHER_IMPL_H_ 42 #endif // SERVICES_WINDOW_MANAGER_NATIVE_VIEWPORT_EVENT_DISPATCHER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | services/window_manager/native_viewport_event_dispatcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698