| 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/macros.h" | 10 #include "base/macros.h" |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 return NULL; | 403 return NULL; |
| 404 | 404 |
| 405 extensions::TabHelper::FromWebContents(tab)->UpdateShortcutOnLoadComplete(); | 405 extensions::TabHelper::FromWebContents(tab)->UpdateShortcutOnLoadComplete(); |
| 406 | 406 |
| 407 return tab; | 407 return tab; |
| 408 } | 408 } |
| 409 | 409 |
| 410 bool CanLaunchViaEvent(const extensions::Extension* extension) { | 410 bool CanLaunchViaEvent(const extensions::Extension* extension) { |
| 411 const extensions::Feature* feature = | 411 const extensions::Feature* feature = |
| 412 extensions::FeatureProvider::GetAPIFeature("app.runtime"); | 412 extensions::FeatureProvider::GetAPIFeature("app.runtime"); |
| 413 return feature->IsAvailableToExtension(extension).is_available(); | 413 return feature && feature->IsAvailableToExtension(extension).is_available(); |
| 414 } | 414 } |
| OLD | NEW |