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

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

Issue 797113002: Toggling 'Open in a tab' now works for hosted apps on chrome://apps page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 this.launch_ = this.appendMenuItem_(); 48 this.launch_ = this.appendMenuItem_();
49 this.launch_.addEventListener('activate', this.onLaunch_.bind(this)); 49 this.launch_.addEventListener('activate', this.onLaunch_.bind(this));
50 50
51 menu.appendChild(cr.ui.MenuItem.createSeparator()); 51 menu.appendChild(cr.ui.MenuItem.createSeparator());
52 if (loadTimeData.getBoolean('enableStreamlinedHostedApps')) 52 if (loadTimeData.getBoolean('enableStreamlinedHostedApps'))
53 this.launchRegularTab_ = this.appendMenuItem_('applaunchtypetab'); 53 this.launchRegularTab_ = this.appendMenuItem_('applaunchtypetab');
54 else 54 else
55 this.launchRegularTab_ = this.appendMenuItem_('applaunchtyperegular'); 55 this.launchRegularTab_ = this.appendMenuItem_('applaunchtyperegular');
56 this.launchPinnedTab_ = this.appendMenuItem_('applaunchtypepinned'); 56 this.launchPinnedTab_ = this.appendMenuItem_('applaunchtypepinned');
57 if (!cr.isMac) 57 this.launchNewWindow_ = this.appendMenuItem_('applaunchtypewindow');
58 this.launchNewWindow_ = this.appendMenuItem_('applaunchtypewindow');
59 this.launchFullscreen_ = this.appendMenuItem_('applaunchtypefullscreen'); 58 this.launchFullscreen_ = this.appendMenuItem_('applaunchtypefullscreen');
60 59
61 var self = this; 60 var self = this;
62 this.forAllLaunchTypes_(function(launchTypeButton, id) { 61 this.forAllLaunchTypes_(function(launchTypeButton, id) {
63 launchTypeButton.addEventListener('activate', 62 launchTypeButton.addEventListener('activate',
64 self.onLaunchTypeChanged_.bind(self)); 63 self.onLaunchTypeChanged_.bind(self));
65 }); 64 });
66 65
67 this.launchTypeMenuSeparator_ = cr.ui.MenuItem.createSeparator(); 66 this.launchTypeMenuSeparator_ = cr.ui.MenuItem.createSeparator();
68 menu.appendChild(this.launchTypeMenuSeparator_); 67 menu.appendChild(this.launchTypeMenuSeparator_);
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 function launchAppAfterEnable(appId) { 769 function launchAppAfterEnable(appId) {
771 chrome.send('launchApp', [appId, APP_LAUNCH.NTP_APP_RE_ENABLE]); 770 chrome.send('launchApp', [appId, APP_LAUNCH.NTP_APP_RE_ENABLE]);
772 } 771 }
773 772
774 return { 773 return {
775 APP_LAUNCH: APP_LAUNCH, 774 APP_LAUNCH: APP_LAUNCH,
776 AppsPage: AppsPage, 775 AppsPage: AppsPage,
777 launchAppAfterEnable: launchAppAfterEnable, 776 launchAppAfterEnable: launchAppAfterEnable,
778 }; 777 };
779 }); 778 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698