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

Side by Side Diff: services/native_viewport/native_viewport_impl.h

Issue 1033513003: Cleans up events to just the parts we're actually using (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: cleanup Created 5 years, 9 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
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_NATIVE_VIEWPORT_NATIVE_VIEWPORT_IMPL_H_ 5 #ifndef SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_IMPL_H_
6 #define SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_IMPL_H_ 6 #define SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "mojo/public/cpp/bindings/strong_binding.h" 10 #include "mojo/public/cpp/bindings/strong_binding.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 void SetSize(mojo::SizePtr size) override; 46 void SetSize(mojo::SizePtr size) override;
47 void GetContextProvider( 47 void GetContextProvider(
48 mojo::InterfaceRequest<mojo::ContextProvider> request) override; 48 mojo::InterfaceRequest<mojo::ContextProvider> request) override;
49 void SetEventDispatcher( 49 void SetEventDispatcher(
50 mojo::NativeViewportEventDispatcherPtr dispatcher) override; 50 mojo::NativeViewportEventDispatcherPtr dispatcher) override;
51 51
52 // PlatformViewport::Delegate implementation. 52 // PlatformViewport::Delegate implementation.
53 void OnMetricsChanged(mojo::ViewportMetricsPtr metrics) override; 53 void OnMetricsChanged(mojo::ViewportMetricsPtr metrics) override;
54 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override; 54 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override;
55 void OnAcceleratedWidgetDestroyed() override; 55 void OnAcceleratedWidgetDestroyed() override;
56 bool OnEvent(ui::Event* ui_event) override; 56 bool OnEvent(mojo::EventPtr event) override;
57 void OnDestroyed() override; 57 void OnDestroyed() override;
58 58
59 // mojo::ErrorHandler implementation. 59 // mojo::ErrorHandler implementation.
60 void OnConnectionError() override; 60 void OnConnectionError() override;
61 61
62 void AckEvent(); 62 void AckEvent();
63 63
64 private: 64 private:
65 bool is_headless_; 65 bool is_headless_;
66 scoped_ptr<PlatformViewport> platform_viewport_; 66 scoped_ptr<PlatformViewport> platform_viewport_;
67 OnscreenContextProvider context_provider_; 67 OnscreenContextProvider context_provider_;
68 bool sent_metrics_; 68 bool sent_metrics_;
69 mojo::ViewportMetricsPtr metrics_; 69 mojo::ViewportMetricsPtr metrics_;
70 bool waiting_for_event_ack_; 70 bool waiting_for_event_ack_;
71 CreateCallback create_callback_; 71 CreateCallback create_callback_;
72 RequestMetricsCallback metrics_callback_; 72 RequestMetricsCallback metrics_callback_;
73 mojo::NativeViewportEventDispatcherPtr event_dispatcher_; 73 mojo::NativeViewportEventDispatcherPtr event_dispatcher_;
74 mojo::Binding<mojo::NativeViewport> binding_; 74 mojo::Binding<mojo::NativeViewport> binding_;
75 base::WeakPtrFactory<NativeViewportImpl> weak_factory_; 75 base::WeakPtrFactory<NativeViewportImpl> weak_factory_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(NativeViewportImpl); 77 DISALLOW_COPY_AND_ASSIGN(NativeViewportImpl);
78 }; 78 };
79 79
80 } // namespace native_viewport 80 } // namespace native_viewport
81 81
82 #endif // SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_IMPL_H_ 82 #endif // SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/input_events/public/interfaces/input_events.mojom ('k') | services/native_viewport/native_viewport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698