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

Side by Side Diff: remoting/webapp/clipboard.js

Issue 339613003: Remove the blue tool-bar for apps v2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made unit-tests side-effect-free. Created 6 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 unified diff | Download patch
« no previous file with comments | « remoting/webapp/client_session.js ('k') | remoting/webapp/feedback.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * A class for moving clipboard items between the plugin and the OS. 7 * A class for moving clipboard items between the plugin and the OS.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 * Initiates the process of sending any fresh items on the OS clipboard, to the 160 * Initiates the process of sending any fresh items on the OS clipboard, to the
161 * host. 161 * host.
162 * 162 *
163 * This method makes the browser fire a paste event, which provides access to 163 * This method makes the browser fire a paste event, which provides access to
164 * the OS clipboard. That event will be caught by a handler in the document, 164 * the OS clipboard. That event will be caught by a handler in the document,
165 * which will call toHost(). 165 * which will call toHost().
166 */ 166 */
167 remoting.Clipboard.prototype.initiateToHost = function() { 167 remoting.Clipboard.prototype.initiateToHost = function() {
168 // It would be cleaner to send a paste command to the plugin element, 168 // It would be cleaner to send a paste command to the plugin element,
169 // but that's not supported. 169 // but that's not supported.
170 console.log('Initiating clipboard paste.'); 170 //console.log('Initiating clipboard paste.');
171 document.execCommand("paste"); 171 document.execCommand("paste");
172 }; 172 };
173 173
174 /** 174 /**
175 * Initiates the process of sending any items freshly received from the host, 175 * Initiates the process of sending any items freshly received from the host,
176 * to the OS clipboard. 176 * to the OS clipboard.
177 * 177 *
178 * This method makes the browser fire a copy event, which provides access to 178 * This method makes the browser fire a copy event, which provides access to
179 * the OS clipboard. That event will be caught by a handler in the document, 179 * the OS clipboard. That event will be caught by a handler in the document,
180 * which will call toOs(). 180 * which will call toOs().
181 */ 181 */
182 remoting.Clipboard.prototype.initiateToOs = function() { 182 remoting.Clipboard.prototype.initiateToOs = function() {
183 // It would be cleaner to send a paste command to the plugin element, 183 // It would be cleaner to send a paste command to the plugin element,
184 // but that's not supported. 184 // but that's not supported.
185 console.log('Initiating clipboard copy.'); 185 console.log('Initiating clipboard copy.');
186 document.execCommand("copy"); 186 document.execCommand("copy");
187 }; 187 };
188 188
189 /** @type {remoting.Clipboard} */ 189 /** @type {remoting.Clipboard} */
190 remoting.clipboard = null; 190 remoting.clipboard = null;
OLDNEW
« no previous file with comments | « remoting/webapp/client_session.js ('k') | remoting/webapp/feedback.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698