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

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

Issue 1453823005: Implement Linux IME support (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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 <set> 8 #include <set>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 const CreateCallback& callback) override; 49 const CreateCallback& callback) override;
50 void RequestMetrics(const RequestMetricsCallback& callback) override; 50 void RequestMetrics(const RequestMetricsCallback& callback) override;
51 void Show() override; 51 void Show() override;
52 void Hide() override; 52 void Hide() override;
53 void Close() override; 53 void Close() override;
54 void SetSize(mojo::SizePtr size) override; 54 void SetSize(mojo::SizePtr size) override;
55 void GetContextProvider( 55 void GetContextProvider(
56 mojo::InterfaceRequest<mojo::ContextProvider> request) override; 56 mojo::InterfaceRequest<mojo::ContextProvider> request) override;
57 void SetEventDispatcher( 57 void SetEventDispatcher(
58 mojo::NativeViewportEventDispatcherPtr dispatcher) override; 58 mojo::NativeViewportEventDispatcherPtr dispatcher) override;
59 void SetKeyEventDispatcher(
60 mojo::NativeViewportEventDispatcherPtr dispatcher) override;
59 61
60 // PlatformViewport::Delegate implementation. 62 // PlatformViewport::Delegate implementation.
61 void OnMetricsChanged(mojo::ViewportMetricsPtr metrics) override; 63 void OnMetricsChanged(mojo::ViewportMetricsPtr metrics) override;
62 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override; 64 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override;
63 void OnAcceleratedWidgetDestroyed() override; 65 void OnAcceleratedWidgetDestroyed() override;
64 bool OnEvent(mojo::EventPtr event) override; 66 bool OnEvent(mojo::EventPtr event) override;
65 void OnDestroyed() override; 67 void OnDestroyed() override;
66 68
67 private: 69 private:
68 // Callback when the dispatcher has processed a message we're waiting on 70 // Callback when the dispatcher has processed a message we're waiting on
69 // an ack from. |pointer_id| identifies the pointer the message was associated 71 // an ack from. |pointer_id| identifies the pointer the message was associated
70 // with. 72 // with.
71 void AckEvent(int32 pointer_id); 73 void AckEvent(int32 pointer_id);
72 74
73 mojo::ApplicationImpl* application_; 75 mojo::ApplicationImpl* application_;
74 bool is_headless_; 76 bool is_headless_;
75 scoped_ptr<PlatformViewport> platform_viewport_; 77 scoped_ptr<PlatformViewport> platform_viewport_;
76 OnscreenContextProvider context_provider_; 78 OnscreenContextProvider context_provider_;
77 bool sent_metrics_; 79 bool sent_metrics_;
78 mojo::ViewportMetricsPtr metrics_; 80 mojo::ViewportMetricsPtr metrics_;
79 CreateCallback create_callback_; 81 CreateCallback create_callback_;
80 RequestMetricsCallback metrics_callback_; 82 RequestMetricsCallback metrics_callback_;
81 mojo::NativeViewportEventDispatcherPtr event_dispatcher_; 83 mojo::NativeViewportEventDispatcherPtr event_dispatcher_;
84 mojo::NativeViewportEventDispatcherPtr key_event_dispatcher_;
82 mojo::StrongBinding<mojo::NativeViewport> binding_; 85 mojo::StrongBinding<mojo::NativeViewport> binding_;
83 86
84 // Set of pointer_ids we've sent a move to and are waiting on an ack. 87 // Set of pointer_ids we've sent a move to and are waiting on an ack.
85 std::set<int32> pointers_waiting_on_ack_; 88 std::set<int32> pointers_waiting_on_ack_;
86 89
87 base::WeakPtrFactory<NativeViewportImpl> weak_factory_; 90 base::WeakPtrFactory<NativeViewportImpl> weak_factory_;
88 91
89 DISALLOW_COPY_AND_ASSIGN(NativeViewportImpl); 92 DISALLOW_COPY_AND_ASSIGN(NativeViewportImpl);
90 }; 93 };
91 94
92 } // namespace native_viewport 95 } // namespace native_viewport
93 96
94 #endif // SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_IMPL_H_ 97 #endif // SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698