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

Side by Side Diff: chrome/browser/resources/feedback/js/event_handler.js

Issue 2295793002: feedback UI: use native window controls on Mac (Closed)
Patch Set: fix API test Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <include src="data.js"> 5 <include src="data.js">
6 6
7 /** 7 /**
8 * @type {number} 8 * @type {number}
9 * @const 9 * @const
10 */ 10 */
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 * Callback which starts up the feedback UI. 253 * Callback which starts up the feedback UI.
254 * @param {Object} feedbackInfo Object containing any initial feedback info. 254 * @param {Object} feedbackInfo Object containing any initial feedback info.
255 */ 255 */
256 function startFeedbackUI(feedbackInfo) { 256 function startFeedbackUI(feedbackInfo) {
257 var win = chrome.app.window.get(FEEDBACK_DEFAULT_WINDOW_ID); 257 var win = chrome.app.window.get(FEEDBACK_DEFAULT_WINDOW_ID);
258 if (win) { 258 if (win) {
259 win.show(); 259 win.show();
260 return; 260 return;
261 } 261 }
262 chrome.app.window.create('html/default.html', { 262 chrome.app.window.create('html/default.html', {
263 frame: 'none', 263 frame: feedbackInfo.useSystemWindowFrame ? 'chrome' : 'none',
264 id: FEEDBACK_DEFAULT_WINDOW_ID, 264 id: FEEDBACK_DEFAULT_WINDOW_ID,
265 width: FEEDBACK_WIDTH, 265 width: FEEDBACK_WIDTH,
266 height: FEEDBACK_HEIGHT, 266 height: FEEDBACK_HEIGHT,
267 hidden: true, 267 hidden: true,
268 resizable: false }, 268 resizable: false },
269 function(appWindow) { 269 function(appWindow) {
270 var request = new FeedbackRequest(feedbackInfo); 270 var request = new FeedbackRequest(feedbackInfo);
271 271
272 // The feedbackInfo member of the new window should refer to the one in 272 // The feedbackInfo member of the new window should refer to the one in
273 // its corresponding FeedbackRequest object to avoid copying and 273 // its corresponding FeedbackRequest object to avoid copying and
(...skipping 16 matching lines...) Expand all
290 // Observe when the window is closed. 290 // Observe when the window is closed.
291 appWindow.onClosed.addListener(function() { 291 appWindow.onClosed.addListener(function() {
292 request.onWindowClosed(); 292 request.onWindowClosed();
293 }); 293 });
294 }); 294 });
295 } 295 }
296 296
297 chrome.runtime.onMessage.addListener(feedbackReadyHandler); 297 chrome.runtime.onMessage.addListener(feedbackReadyHandler);
298 chrome.runtime.onMessageExternal.addListener(requestFeedbackHandler); 298 chrome.runtime.onMessageExternal.addListener(requestFeedbackHandler);
299 chrome.feedbackPrivate.onFeedbackRequested.addListener(startFeedbackUI); 299 chrome.feedbackPrivate.onFeedbackRequested.addListener(startFeedbackUI);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698