OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/extensions/extension_view_host.h" | 5 #include "chrome/browser/extensions/extension_view_host.h" |
6 | 6 |
7 #include "base/strings/string_piece.h" | 7 #include "base/strings/string_piece.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/extensions/extension_view.h" | 10 #include "chrome/browser/extensions/extension_view.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 ExtensionViewHost::ExtensionViewHost( | 60 ExtensionViewHost::ExtensionViewHost( |
61 const Extension* extension, | 61 const Extension* extension, |
62 content::SiteInstance* site_instance, | 62 content::SiteInstance* site_instance, |
63 const GURL& url, | 63 const GURL& url, |
64 ViewType host_type) | 64 ViewType host_type) |
65 : ExtensionHost(extension, site_instance, url, host_type), | 65 : ExtensionHost(extension, site_instance, url, host_type), |
66 associated_web_contents_(NULL) { | 66 associated_web_contents_(NULL) { |
67 // Not used for panels, see PanelHost. | 67 // Not used for panels, see PanelHost. |
68 DCHECK(host_type == VIEW_TYPE_EXTENSION_DIALOG || | 68 DCHECK(host_type == VIEW_TYPE_EXTENSION_DIALOG || |
| 69 host_type == VIEW_TYPE_EXTENSION_SIDEBAR || |
69 host_type == VIEW_TYPE_EXTENSION_POPUP); | 70 host_type == VIEW_TYPE_EXTENSION_POPUP); |
70 | 71 |
71 // Attach WebContents helpers. Extension tabs automatically get them attached | 72 // Attach WebContents helpers. Extension tabs automatically get them attached |
72 // in TabHelpers::AttachTabHelpers, but popups don't. | 73 // in TabHelpers::AttachTabHelpers, but popups don't. |
73 // TODO(kalman): How much of TabHelpers::AttachTabHelpers should be here? | 74 // TODO(kalman): How much of TabHelpers::AttachTabHelpers should be here? |
74 autofill::ChromeAutofillClient::CreateForWebContents(host_contents()); | 75 autofill::ChromeAutofillClient::CreateForWebContents(host_contents()); |
75 autofill::ContentAutofillDriverFactory::CreateForWebContentsAndDelegate( | 76 autofill::ContentAutofillDriverFactory::CreateForWebContentsAndDelegate( |
76 host_contents(), | 77 host_contents(), |
77 autofill::ChromeAutofillClient::FromWebContents(host_contents()), | 78 autofill::ChromeAutofillClient::FromWebContents(host_contents()), |
78 g_browser_process->GetApplicationLocale(), | 79 g_browser_process->GetApplicationLocale(), |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 const content::NotificationSource& source, | 298 const content::NotificationSource& source, |
298 const content::NotificationDetails& details) { | 299 const content::NotificationDetails& details) { |
299 DCHECK_EQ(type, extensions::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY); | 300 DCHECK_EQ(type, extensions::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY); |
300 DCHECK(ExtensionSystem::Get(browser_context()) | 301 DCHECK(ExtensionSystem::Get(browser_context()) |
301 ->runtime_data() | 302 ->runtime_data() |
302 ->IsBackgroundPageReady(extension())); | 303 ->IsBackgroundPageReady(extension())); |
303 LoadInitialURL(); | 304 LoadInitialURL(); |
304 } | 305 } |
305 | 306 |
306 } // namespace extensions | 307 } // namespace extensions |
OLD | NEW |