| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/extension_installed_notification.h" | 5 #include "chrome/browser/ui/extensions/extension_installed_notification.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/extensions/extension_util.h" | 9 #include "chrome/browser/extensions/extension_util.h" |
| 10 #include "chrome/browser/notifications/notification.h" | 10 #include "chrome/browser/notifications/notification.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 if (!extensions::util::IsAppLaunchable(extension_id_, profile_)) | 62 if (!extensions::util::IsAppLaunchable(extension_id_, profile_)) |
| 63 return; | 63 return; |
| 64 | 64 |
| 65 const extensions::Extension* extension = | 65 const extensions::Extension* extension = |
| 66 extensions::ExtensionRegistry::Get(profile_)->GetExtensionById( | 66 extensions::ExtensionRegistry::Get(profile_)->GetExtensionById( |
| 67 extension_id_, extensions::ExtensionRegistry::EVERYTHING); | 67 extension_id_, extensions::ExtensionRegistry::EVERYTHING); |
| 68 if (!extension) | 68 if (!extension) |
| 69 return; | 69 return; |
| 70 | 70 |
| 71 AppLaunchParams params = CreateAppLaunchParamsUserContainer( | 71 AppLaunchParams params = CreateAppLaunchParamsUserContainer( |
| 72 profile_, extension, NEW_FOREGROUND_TAB, | 72 profile_, extension, WindowOpenDisposition::NEW_FOREGROUND_TAB, |
| 73 extensions::SOURCE_INSTALLED_NOTIFICATION); | 73 extensions::SOURCE_INSTALLED_NOTIFICATION); |
| 74 OpenApplication(params); | 74 OpenApplication(params); |
| 75 } | 75 } |
| 76 | 76 |
| 77 std::string ExtensionInstalledNotification::id() const { | 77 std::string ExtensionInstalledNotification::id() const { |
| 78 return kNotificationId; | 78 return kNotificationId; |
| 79 } | 79 } |
| OLD | NEW |