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

Side by Side Diff: remoting/webapp/app_remoting/js/application_context_menu.js

Issue 1191883002: Revert of [AppRemoting] Break out AppRemoting shared module (re-land). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * Class representing the application's context menu. 7 * Class representing the application's context menu.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 }; 96 };
97 97
98 /** @type {remoting.ApplicationContextMenu} */ 98 /** @type {remoting.ApplicationContextMenu} */
99 var that = this; 99 var that = this;
100 100
101 /** @param {chrome.app.window.AppWindow} consentWindow */ 101 /** @param {chrome.app.window.AppWindow} consentWindow */
102 var onCreate = function(consentWindow) { 102 var onCreate = function(consentWindow) {
103 var onLoad = function() { 103 var onLoad = function() {
104 var message = { 104 var message = {
105 method: 'init', 105 method: 'init',
106 appId: remoting.app.getApplicationId(),
107 hostId: that.hostId_, 106 hostId: that.hostId_,
108 connectionStats: JSON.stringify(that.stats_.mostRecent()), 107 connectionStats: JSON.stringify(that.stats_.mostRecent()),
109 sessionId: that.clientSession_.getLogger().getSessionId() 108 sessionId: that.clientSession_.getLogger().getSessionId()
110 }; 109 };
111 consentWindow.contentWindow.postMessage(message, '*'); 110 consentWindow.contentWindow.postMessage(message, '*');
112 }; 111 };
113 consentWindow.contentWindow.addEventListener('load', onLoad, false); 112 consentWindow.contentWindow.addEventListener('load', onLoad, false);
114 }; 113 };
115 chrome.app.window.create( 114 chrome.app.window.create(
116 'feedback_consent.html', windowAttributes, onCreate); 115 'feedback_consent.html', windowAttributes, onCreate);
117 break; 116 break;
118 117
119 case remoting.ApplicationContextMenu.kShowStatsId: 118 case remoting.ApplicationContextMenu.kShowStatsId:
120 this.stats_.show(info.checked); 119 this.stats_.show(info.checked);
121 break; 120 break;
122 } 121 }
123 }; 122 };
124 123
125 124
126 /** @type {string} */ 125 /** @type {string} */
127 remoting.ApplicationContextMenu.kSendFeedbackId = 'send-feedback'; 126 remoting.ApplicationContextMenu.kSendFeedbackId = 'send-feedback';
128 127
129 /** @type {string} */ 128 /** @type {string} */
130 remoting.ApplicationContextMenu.kShowStatsId = 'show-stats'; 129 remoting.ApplicationContextMenu.kShowStatsId = 'show-stats';
OLDNEW
« no previous file with comments | « remoting/webapp/app_remoting/js/app_remoting_activity.js ('k') | remoting/webapp/app_remoting/js/ar_background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698