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

Side by Side Diff: chrome/browser/resources/ntp4/apps_page.js

Issue 1091173005: Removed the context menu in kiosk mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable the context menu in kiosk mode 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 (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 cr.define('ntp', function() { 5 cr.define('ntp', function() {
6 'use strict'; 6 'use strict';
7 7
8 var APP_LAUNCH = { 8 var APP_LAUNCH = {
9 // The histogram buckets (keep in sync with extension_constants.h). 9 // The histogram buckets (keep in sync with extension_constants.h).
10 NTP_APPS_MAXIMIZED: 0, 10 NTP_APPS_MAXIMIZED: 0,
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 this.addEventListener('keydown', cr.ui.contextMenuHandler); 272 this.addEventListener('keydown', cr.ui.contextMenuHandler);
273 this.addEventListener('keyup', cr.ui.contextMenuHandler); 273 this.addEventListener('keyup', cr.ui.contextMenuHandler);
274 274
275 // This hack is here so that appContents.contextMenu will be the same as 275 // This hack is here so that appContents.contextMenu will be the same as
276 // this.contextMenu. 276 // this.contextMenu.
277 var self = this; 277 var self = this;
278 this.appContents_.__defineGetter__('contextMenu', function() { 278 this.appContents_.__defineGetter__('contextMenu', function() {
279 return self.contextMenu; 279 return self.contextMenu;
280 }); 280 });
281 this.appContents_.addEventListener('contextmenu', 281
282 cr.ui.contextMenuHandler); 282 if (!this.appData_.kioskMode)
Peter Kasting 2015/06/15 20:16:33 Nit: {}
frederic.jacob.78 2015/06/24 18:07:52 Done.
283 this.appContents_.addEventListener('contextmenu',
284 cr.ui.contextMenuHandler);
Peter Kasting 2015/06/15 20:16:33 Nit: Indenting not correct
frederic.jacob.78 2015/06/24 18:07:52 Done.
283 285
284 this.addEventListener('mousedown', this.onMousedown_, true); 286 this.addEventListener('mousedown', this.onMousedown_, true);
285 this.addEventListener('keydown', this.onKeydown_); 287 this.addEventListener('keydown', this.onKeydown_);
286 this.addEventListener('keyup', this.onKeyup_); 288 this.addEventListener('keyup', this.onKeyup_);
287 }, 289 },
288 290
289 /** 291 /**
290 * Sets the color of the favicon dominant color bar. 292 * Sets the color of the favicon dominant color bar.
291 * @param {string} color The css-parsable value for the color. 293 * @param {string} color The css-parsable value for the color.
292 */ 294 */
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 function launchAppAfterEnable(appId) { 777 function launchAppAfterEnable(appId) {
776 chrome.send('launchApp', [appId, APP_LAUNCH.NTP_APP_RE_ENABLE]); 778 chrome.send('launchApp', [appId, APP_LAUNCH.NTP_APP_RE_ENABLE]);
777 } 779 }
778 780
779 return { 781 return {
780 APP_LAUNCH: APP_LAUNCH, 782 APP_LAUNCH: APP_LAUNCH,
781 AppsPage: AppsPage, 783 AppsPage: AppsPage,
782 launchAppAfterEnable: launchAppAfterEnable, 784 launchAppAfterEnable: launchAppAfterEnable,
783 }; 785 };
784 }); 786 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698