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

Unified Diff: remoting/client/jni/chromoting_jni_instance.cc

Issue 21236002: Chromoting Android app mouse/keyboard bugfixes and enhancements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One last (TODO) comment change Created 7 years, 5 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 | « remoting/client/jni/chromoting_jni_instance.h ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/chromoting_jni_instance.cc
diff --git a/remoting/client/jni/chromoting_jni_instance.cc b/remoting/client/jni/chromoting_jni_instance.cc
index dcec68fcaadc559336627485d9fda1acba48ff18..b2790b846e469dd57fbdf9e93cbdd7f1cb537524 100644
--- a/remoting/client/jni/chromoting_jni_instance.cc
+++ b/remoting/client/jni/chromoting_jni_instance.cc
@@ -12,9 +12,9 @@
#include "remoting/protocol/libjingle_transport_factory.h"
// TODO(solb) Move into location shared with client plugin.
-const char* const CHAT_SERVER = "talk.google.com";
-const int CHAT_PORT = 5222;
-const bool CHAT_USE_TLS = true;
+const char* const kXmppServer = "talk.google.com";
+const int kXmppPort = 5222;
+const bool kXmppUseTls = true;
namespace remoting {
@@ -83,7 +83,7 @@ void ChromotingJniInstance::PerformMouseAction(
int x,
int y,
protocol::MouseEvent_MouseButton button,
- bool buttonDown) {
+ bool button_down) {
if (!jni_runtime_->network_task_runner()->BelongsToCurrentThread()) {
jni_runtime_->network_task_runner()->PostTask(
FROM_HERE,
@@ -92,7 +92,7 @@ void ChromotingJniInstance::PerformMouseAction(
x,
y,
button,
- buttonDown));
+ button_down));
return;
}
@@ -101,31 +101,32 @@ void ChromotingJniInstance::PerformMouseAction(
action.set_y(y);
action.set_button(button);
if (button != protocol::MouseEvent::BUTTON_UNDEFINED)
- action.set_button_down(buttonDown);
+ action.set_button_down(button_down);
connection_->input_stub()->InjectMouseEvent(action);
}
-void ChromotingJniInstance::PerformKeyboardAction(int keyCode, bool keyDown) {
+void ChromotingJniInstance::PerformKeyboardAction(int key_code, bool key_down) {
if (!jni_runtime_->network_task_runner()->BelongsToCurrentThread()) {
jni_runtime_->network_task_runner()->PostTask(
FROM_HERE,
base::Bind(&ChromotingJniInstance::PerformKeyboardAction,
this,
- keyCode,
- keyDown));
+ key_code,
+ key_down));
return;
}
- uint32 usbCode = AndroidKeycodeToUsbKeycode(keyCode);
- if (usbCode) {
+ uint32 usb_code = AndroidKeycodeToUsbKeycode(key_code);
+ if (usb_code) {
protocol::KeyEvent action;
- action.set_usb_keycode(usbCode);
- action.set_pressed(keyDown);
+ action.set_usb_keycode(usb_code);
+ action.set_pressed(key_down);
connection_->input_stub()->InjectKeyEvent(action);
}
- else
- LOG(WARNING) << "Ignoring unknown keycode: " << keyCode;
+ else {
+ LOG(WARNING) << "Ignoring unknown keycode: " << key_code;
+ }
}
void ChromotingJniInstance::OnConnectionState(
@@ -227,9 +228,9 @@ void ChromotingJniInstance::ConnectToHostOnNetworkThread() {
view_->set_frame_producer(client_->GetFrameProducer());
signaling_config_.reset(new XmppSignalStrategy::XmppServerConfig());
- signaling_config_->host = CHAT_SERVER;
- signaling_config_->port = CHAT_PORT;
- signaling_config_->use_tls = CHAT_USE_TLS;
+ signaling_config_->host = kXmppServer;
+ signaling_config_->port = kXmppPort;
+ signaling_config_->use_tls = kXmppUseTls;
signaling_.reset(new XmppSignalStrategy(jni_runtime_->url_requester(),
username_,
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.h ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698