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

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

Issue 1179873005: [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(),
106 hostId: that.hostId_, 107 hostId: that.hostId_,
107 connectionStats: JSON.stringify(that.stats_.mostRecent()), 108 connectionStats: JSON.stringify(that.stats_.mostRecent()),
108 sessionId: that.clientSession_.getLogger().getSessionId() 109 sessionId: that.clientSession_.getLogger().getSessionId()
109 }; 110 };
110 consentWindow.contentWindow.postMessage(message, '*'); 111 consentWindow.contentWindow.postMessage(message, '*');
111 }; 112 };
112 consentWindow.contentWindow.addEventListener('load', onLoad, false); 113 consentWindow.contentWindow.addEventListener('load', onLoad, false);
113 }; 114 };
114 chrome.app.window.create( 115 chrome.app.window.create(
115 'feedback_consent.html', windowAttributes, onCreate); 116 'feedback_consent.html', windowAttributes, onCreate);
116 break; 117 break;
117 118
118 case remoting.ApplicationContextMenu.kShowStatsId: 119 case remoting.ApplicationContextMenu.kShowStatsId:
119 this.stats_.show(info.checked); 120 this.stats_.show(info.checked);
120 break; 121 break;
121 } 122 }
122 }; 123 };
123 124
124 125
125 /** @type {string} */ 126 /** @type {string} */
126 remoting.ApplicationContextMenu.kSendFeedbackId = 'send-feedback'; 127 remoting.ApplicationContextMenu.kSendFeedbackId = 'send-feedback';
127 128
128 /** @type {string} */ 129 /** @type {string} */
129 remoting.ApplicationContextMenu.kShowStatsId = 'show-stats'; 130 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