| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |