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

Side by Side Diff: chrome/browser/ui/extensions/application_launch.cc

Issue 293943002: Clean up TestFeaturesNativeHandler to use the ExtensionsClient's JSON feature sources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 | Annotate | Revision Log
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 #include "chrome/browser/ui/extensions/application_launch.h" 5 #include "chrome/browser/ui/extensions/application_launch.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "apps/launcher.h" 9 #include "apps/launcher.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 // OnDidGetApplicationInfo, which calls 463 // OnDidGetApplicationInfo, which calls
464 // web_app::UpdateShortcutForTabContents when it sees UPDATE_SHORTCUT as 464 // web_app::UpdateShortcutForTabContents when it sees UPDATE_SHORTCUT as
465 // pending web app action. 465 // pending web app action.
466 extensions::TabHelper::FromWebContents(tab)->set_pending_web_app_action( 466 extensions::TabHelper::FromWebContents(tab)->set_pending_web_app_action(
467 extensions::TabHelper::UPDATE_SHORTCUT); 467 extensions::TabHelper::UPDATE_SHORTCUT);
468 468
469 return tab; 469 return tab;
470 } 470 }
471 471
472 bool CanLaunchViaEvent(const extensions::Extension* extension) { 472 bool CanLaunchViaEvent(const extensions::Extension* extension) {
473 extensions::FeatureProvider* feature_provider = 473 const extensions::FeatureProvider* feature_provider =
474 extensions::FeatureProvider::GetAPIFeatures(); 474 extensions::FeatureProvider::GetAPIFeatures();
475 extensions::Feature* feature = feature_provider->GetFeature("app.runtime"); 475 extensions::Feature* feature = feature_provider->GetFeature("app.runtime");
476 return feature->IsAvailableToExtension(extension).is_available(); 476 return feature->IsAvailableToExtension(extension).is_available();
477 } 477 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/enhanced_bookmarks_features.cc ('k') | chrome/common/extensions/chrome_extensions_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698