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/extension_enable_flow.h" | 5 #include "chrome/browser/ui/extensions/extension_enable_flow.h" |
6 | 6 |
7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/browser/extensions/extension_system.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h" | 11 #include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h" |
12 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" | 12 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
13 #include "content/public/browser/notification_details.h" | 13 #include "content/public/browser/notification_details.h" |
14 #include "content/public/browser/notification_source.h" | 14 #include "content/public/browser/notification_source.h" |
| 15 #include "extensions/browser/extension_system.h" |
15 | 16 |
16 using extensions::Extension; | 17 using extensions::Extension; |
17 | 18 |
18 ExtensionEnableFlow::ExtensionEnableFlow(Profile* profile, | 19 ExtensionEnableFlow::ExtensionEnableFlow(Profile* profile, |
19 const std::string& extension_id, | 20 const std::string& extension_id, |
20 ExtensionEnableFlowDelegate* delegate) | 21 ExtensionEnableFlowDelegate* delegate) |
21 : profile_(profile), | 22 : profile_(profile), |
22 extension_id_(extension_id), | 23 extension_id_(extension_id), |
23 delegate_(delegate), | 24 delegate_(delegate), |
24 parent_contents_(NULL), | 25 parent_contents_(NULL), |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 delegate_->ExtensionEnableFlowAborted(user_initiated); | 174 delegate_->ExtensionEnableFlowAborted(user_initiated); |
174 // |delegate_| may delete us. | 175 // |delegate_| may delete us. |
175 } | 176 } |
176 | 177 |
177 content::WebContents* ExtensionEnableFlow::OpenURL( | 178 content::WebContents* ExtensionEnableFlow::OpenURL( |
178 const content::OpenURLParams& params) { | 179 const content::OpenURLParams& params) { |
179 chrome::ScopedTabbedBrowserDisplayer displayer( | 180 chrome::ScopedTabbedBrowserDisplayer displayer( |
180 profile_, chrome::GetActiveDesktop()); | 181 profile_, chrome::GetActiveDesktop()); |
181 return displayer.browser()->OpenURL(params); | 182 return displayer.browser()->OpenURL(params); |
182 } | 183 } |
OLD | NEW |