Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: extensions/browser/extension_host.cc

Issue 923463003: [Extensions] Remove the Infobar API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/extension_host.h ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_host.cc
diff --git a/extensions/browser/extension_host.cc b/extensions/browser/extension_host.cc
index e6424531e6c2ccfaf262320a5b8d60981c0b2824..04a067ab314242954b7939fe220dda2447d23baa 100644
--- a/extensions/browser/extension_host.cc
+++ b/extensions/browser/extension_host.cc
@@ -130,7 +130,6 @@ ExtensionHost::ExtensionHost(const Extension* extension,
// Not used for panels, see PanelHost.
DCHECK(host_type == VIEW_TYPE_EXTENSION_BACKGROUND_PAGE ||
host_type == VIEW_TYPE_EXTENSION_DIALOG ||
- host_type == VIEW_TYPE_EXTENSION_INFOBAR ||
host_type == VIEW_TYPE_EXTENSION_POPUP);
host_contents_.reset(WebContents::Create(
WebContents::CreateParams(browser_context_, site_instance))),
@@ -346,18 +345,16 @@ void ExtensionHost::DocumentAvailableInMainFrame() {
if (document_element_available_)
return;
document_element_available_ = true;
- OnDocumentAvailable();
-}
-void ExtensionHost::OnDocumentAvailable() {
- DCHECK(extension_host_type_ == VIEW_TYPE_EXTENSION_BACKGROUND_PAGE);
- ExtensionSystem::Get(browser_context_)
- ->runtime_data()
- ->SetBackgroundPageReady(extension_->id(), true);
- content::NotificationService::current()->Notify(
- extensions::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY,
- content::Source<const Extension>(extension_),
- content::NotificationService::NoDetails());
+ if (extension_host_type_ == VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) {
+ ExtensionSystem::Get(browser_context_)
+ ->runtime_data()
+ ->SetBackgroundPageReady(extension_->id(), true);
+ content::NotificationService::current()->Notify(
+ extensions::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY,
+ content::Source<const Extension>(extension_),
+ content::NotificationService::NoDetails());
+ }
}
void ExtensionHost::CloseContents(WebContents* contents) {
« no previous file with comments | « extensions/browser/extension_host.h ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698