OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * SuggestAppsDialog contains a list box to select an app to be opened the file | 8 * SuggestAppsDialog contains a list box to select an app to be opened the file |
9 * with. This dialog should be used as action picker for file operations. | 9 * with. This dialog should be used as action picker for file operations. |
10 */ | 10 */ |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 }; | 297 }; |
298 | 298 |
299 /** | 299 /** |
300 * Called when the 'See more...' link is clicked to be navigated to Webstore. | 300 * Called when the 'See more...' link is clicked to be navigated to Webstore. |
301 * @param {Event} e Event. | 301 * @param {Event} e Event. |
302 * @private | 302 * @private |
303 */ | 303 */ |
304 SuggestAppsDialog.prototype.onWebstoreLinkClicked_ = function(e) { | 304 SuggestAppsDialog.prototype.onWebstoreLinkClicked_ = function(e) { |
305 var webStoreUrl = | 305 var webStoreUrl = |
306 FileTasks.createWebStoreLink(this.extension_, this.mimeType_); | 306 FileTasks.createWebStoreLink(this.extension_, this.mimeType_); |
307 chrome.windows.create({url: webStoreUrl}); | 307 util.visitURL(webStoreUrl); |
308 this.state_ = SuggestAppsDialog.State.OPENING_WEBSTORE_CLOSING; | 308 this.state_ = SuggestAppsDialog.State.OPENING_WEBSTORE_CLOSING; |
309 this.hide(); | 309 this.hide(); |
310 }; | 310 }; |
311 | 311 |
312 /** | 312 /** |
313 * Called when the widget is loaded successfully. | 313 * Called when the widget is loaded successfully. |
314 * @param {Event} event Event. | 314 * @param {Event} event Event. |
315 * @private | 315 * @private |
316 */ | 316 */ |
317 SuggestAppsDialog.prototype.onWidgetLoaded_ = function(event) { | 317 SuggestAppsDialog.prototype.onWidgetLoaded_ = function(event) { |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 }, | 545 }, |
546 | 546 |
547 startLoad: function() { | 547 startLoad: function() { |
548 metrics.startInterval('SuggestApps.LoadTime'); | 548 metrics.startInterval('SuggestApps.LoadTime'); |
549 }, | 549 }, |
550 | 550 |
551 finishLoad: function() { | 551 finishLoad: function() { |
552 metrics.recordInterval('SuggestApps.LoadTime'); | 552 metrics.recordInterval('SuggestApps.LoadTime'); |
553 }, | 553 }, |
554 }); | 554 }); |
OLD | NEW |