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

Side by Side Diff: remoting/client/jni/chromoting_jni_instance.h

Issue 341693004: Fix Desktop.dispatchKeyEvent() to return correct result. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ 5 #ifndef REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_
6 #define REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ 6 #define REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 void RedrawDesktop(); 80 void RedrawDesktop();
81 81
82 // Moves the host's cursor to the specified coordinates, optionally with some 82 // Moves the host's cursor to the specified coordinates, optionally with some
83 // mouse button depressed. If |button| is BUTTON_UNDEFINED, no click is made. 83 // mouse button depressed. If |button| is BUTTON_UNDEFINED, no click is made.
84 void SendMouseEvent(int x, int y, 84 void SendMouseEvent(int x, int y,
85 protocol::MouseEvent_MouseButton button, 85 protocol::MouseEvent_MouseButton button,
86 bool button_down); 86 bool button_down);
87 void SendMouseWheelEvent(int delta_x, int delta_y); 87 void SendMouseWheelEvent(int delta_x, int delta_y);
88 88
89 // Sends the provided keyboard scan code to the host. 89 // Sends the provided keyboard scan code to the host.
90 void SendKeyEvent(int key_code, bool key_down); 90 bool SendKeyEvent(int key_code, bool key_down);
91 91
92 void SendTextEvent(const std::string& text); 92 void SendTextEvent(const std::string& text);
93 93
94 // Records paint time for statistics logging, if enabled. May be called from 94 // Records paint time for statistics logging, if enabled. May be called from
95 // any thread. 95 // any thread.
96 void RecordPaintTime(int64 paint_time_ms); 96 void RecordPaintTime(int64 paint_time_ms);
97 97
98 // ClientUserInterface implementation. 98 // ClientUserInterface implementation.
99 virtual void OnConnectionState( 99 virtual void OnConnectionState(
100 protocol::ConnectionToHost::State state, 100 protocol::ConnectionToHost::State state,
(...skipping 28 matching lines...) Expand all
129 129
130 // Notifies the user interface that the user needs to enter a PIN. The 130 // Notifies the user interface that the user needs to enter a PIN. The
131 // current authentication attempt is put on hold until |callback| is invoked. 131 // current authentication attempt is put on hold until |callback| is invoked.
132 // May be called on any thread. 132 // May be called on any thread.
133 void FetchSecret(bool pairable, 133 void FetchSecret(bool pairable,
134 const protocol::SecretFetchedCallback& callback); 134 const protocol::SecretFetchedCallback& callback);
135 135
136 // Sets the device name. Can be called on any thread. 136 // Sets the device name. Can be called on any thread.
137 void SetDeviceName(const std::string& device_name); 137 void SetDeviceName(const std::string& device_name);
138 138
139 void SendKeyEventInternal(int usb_key_code, bool key_down);
140
139 // Enables or disables periodic logging of performance statistics. Called on 141 // Enables or disables periodic logging of performance statistics. Called on
140 // the network thread. 142 // the network thread.
141 void EnableStatsLogging(bool enabled); 143 void EnableStatsLogging(bool enabled);
142 144
143 // If logging is enabled, logs the current connection statistics, and 145 // If logging is enabled, logs the current connection statistics, and
144 // triggers another call to this function after the logging time interval. 146 // triggers another call to this function after the logging time interval.
145 // Called on the network thread. 147 // Called on the network thread.
146 void LogPerfStats(); 148 void LogPerfStats();
147 149
148 // Used to obtain task runner references and make calls to Java methods. 150 // Used to obtain task runner references and make calls to Java methods.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; 190 friend class base::RefCountedThreadSafe<ChromotingJniInstance>;
189 191
190 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; 192 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_;
191 193
192 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); 194 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance);
193 }; 195 };
194 196
195 } // namespace remoting 197 } // namespace remoting
196 198
197 #endif 199 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698