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

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

Issue 1078563002: [Webapp Refactor] Clean up remoting.Clipboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove remoting.ClientSession.sendClipboardItem for real Created 5 years, 8 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/connected_view.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/remoting.js
diff --git a/remoting/webapp/crd/js/remoting.js b/remoting/webapp/crd/js/remoting.js
index f3deae1fd82443ad9ea039fc9b23e84d2e331691..34a15c76ded696da4a5172a6d6b5c3d4459e94d3 100644
--- a/remoting/webapp/crd/js/remoting.js
+++ b/remoting/webapp/crd/js/remoting.js
@@ -30,16 +30,10 @@ remoting.initGlobalObjects = function() {
document.getElementById('statistics'));
remoting.formatIq = new remoting.FormatIq();
- remoting.clipboard = new remoting.Clipboard();
var sandbox =
/** @type {HTMLIFrameElement} */ (document.getElementById('wcs-sandbox'));
remoting.wcsSandbox = new remoting.WcsSandboxContainer(sandbox.contentWindow);
- // The plugin's onFocus handler sends a paste command to |window|, because
- // it can't send one to the plugin element itself.
- window.addEventListener('paste', pluginGotPaste_, false);
- window.addEventListener('copy', pluginGotCopy_, false);
-
remoting.initModalDialogs();
remoting.testEvents = new base.EventSourceImpl();
@@ -65,33 +59,6 @@ remoting.getExtensionInfo = function() {
};
/**
- * Callback function called when the browser window gets a paste operation.
- *
- * @param {Event} event
- * @return {void} Nothing.
- */
-function pluginGotPaste_(event) {
- if (event && event.clipboardData) {
- remoting.clipboard.toHost(event.clipboardData);
- }
-}
-
-/**
- * Callback function called when the browser window gets a copy operation.
- *
- * @param {Event} event
- * @return {void} Nothing.
- */
-function pluginGotCopy_(event) {
- if (event && event.clipboardData) {
- if (remoting.clipboard.toOs(event.clipboardData)) {
- // The default action may overwrite items that we added to clipboardData.
- event.preventDefault();
- }
- }
-}
-
-/**
* Return the current time as a formatted string suitable for logging.
*
* @return {string} The current time, formatted as [mmdd/hhmmss.xyz]
« no previous file with comments | « remoting/webapp/crd/js/connected_view.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698