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

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

Issue 7792011: Run LocalizeStrings() on plugin thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix various nits. Created 9 years, 3 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 var remoting = remoting || {}; 5 var remoting = remoting || {};
6 6
7 (function() { 7 (function() {
8 'use strict'; 8 'use strict';
9 9
10 window.addEventListener('blur', pluginLostFocus_, false); 10 window.addEventListener('blur', pluginLostFocus_, false);
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 var div = document.getElementById('host-plugin-container'); 233 var div = document.getElementById('host-plugin-container');
234 var plugin = document.createElement('embed'); 234 var plugin = document.createElement('embed');
235 plugin.type = remoting.PLUGIN_MIMETYPE; 235 plugin.type = remoting.PLUGIN_MIMETYPE;
236 plugin.id = remoting.HOST_PLUGIN_ID; 236 plugin.id = remoting.HOST_PLUGIN_ID;
237 // Hiding the plugin means it doesn't load, so make it size zero instead. 237 // Hiding the plugin means it doesn't load, so make it size zero instead.
238 plugin.width = 0; 238 plugin.width = 0;
239 plugin.height = 0; 239 plugin.height = 0;
240 div.appendChild(plugin); 240 div.appendChild(plugin);
241 plugin.onStateChanged = onStateChanged_; 241 plugin.onStateChanged = onStateChanged_;
242 plugin.logDebugInfo = debugInfoCallback_; 242 plugin.logDebugInfo = debugInfoCallback_;
243 plugin.localizeString = chrome.i18n.getMessage; 243 plugin.localize(chrome.i18n.getMessage);
244 plugin.connect(getEmail(), 244 plugin.connect(getEmail(),
245 'oauth2:' + remoting.oauth2.getAccessToken()); 245 'oauth2:' + remoting.oauth2.getAccessToken());
246 } 246 }
247 247
248 function disableTimeoutCountdown_() { 248 function disableTimeoutCountdown_() {
249 if (remoting.timerRunning) { 249 if (remoting.timerRunning) {
250 clearInterval(remoting.accessCodeTimerId); 250 clearInterval(remoting.accessCodeTimerId);
251 remoting.timerRunning = false; 251 remoting.timerRunning = false;
252 updateTimeoutStyles_(); 252 updateTimeoutStyles_();
253 } 253 }
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 } 653 }
654 } 654 }
655 655
656 remoting.checkHotkeys = function(event) { 656 remoting.checkHotkeys = function(event) {
657 if (String.fromCharCode(event.which) == 'D') { 657 if (String.fromCharCode(event.which) == 'D') {
658 remoting.toggleDebugLog(); 658 remoting.toggleDebugLog();
659 } 659 }
660 } 660 }
661 661
662 }()); 662 }());
OLDNEW
« remoting/host/plugin/host_script_object.cc ('K') | « remoting/host/plugin/host_script_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698