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

Unified Diff: remoting/webapp/crd/js/desktop_connected_view.js

Issue 944123003: Hack webapp to request keyboard events on connection. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hacked up chromoting client and using mouse lock instead of keyboard lock for bubble. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/crd/js/client_plugin_impl.js ('k') | remoting/webapp/crd/manifest.json.jinja2 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/desktop_connected_view.js
diff --git a/remoting/webapp/crd/js/desktop_connected_view.js b/remoting/webapp/crd/js/desktop_connected_view.js
index e4ce2acb0dab98ad18634aca4358d2bf88b58172..c6920614e1b97a0ad427d50f6d23c1985fbc50a4 100644
--- a/remoting/webapp/crd/js/desktop_connected_view.js
+++ b/remoting/webapp/crd/js/desktop_connected_view.js
@@ -404,6 +404,8 @@ remoting.DesktopConnectedView.prototype.updateClientSessionUi_ = function(
// Stop listening for full-screen events.
remoting.fullscreen.removeListener(this.callOnFullScreenChanged_);
+ // Disable keyboard events.
+ chrome.app.window.current().setInterceptAllKeys(false);
} else {
if (remoting.windowFrame) {
remoting.windowFrame.setDesktopConnectedView(this);
@@ -419,6 +421,9 @@ remoting.DesktopConnectedView.prototype.updateClientSessionUi_ = function(
this.notifyClientResolution_();
}
+ // Enable keyboard events.
+ chrome.app.window.current().setInterceptAllKeys(true);
+
document.body.classList.add('connected');
this.container_.addEventListener(
'mousemove', this.updateMouseCursorPosition_, true);
« no previous file with comments | « remoting/webapp/crd/js/client_plugin_impl.js ('k') | remoting/webapp/crd/manifest.json.jinja2 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698