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

Unified Diff: chrome/browser/extensions/extension_host.cc

Issue 8985008: Don't use browser windows for platform app shell windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable platform app tests on non-GTK platforms. Created 8 years, 11 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 | « chrome/browser/extensions/extension_host.h ('k') | chrome/browser/extensions/extension_process_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_host.cc
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 9a467e51b9cacd4a5ddc2df672b6614ffc7a8680..578bf7e7bda44d20bb9257bd17b45c8e0f3d5607 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -189,6 +189,10 @@ void ExtensionHost::CreateView(Browser* browser) {
#endif
}
+void ExtensionHost::CreateViewWithoutBrowser() {
+ CreateView(NULL);
+}
+
WebContents* ExtensionHost::GetAssociatedWebContents() const {
return associated_web_contents_;
}
@@ -331,7 +335,8 @@ void ExtensionHost::DidStopLoading() {
did_stop_loading_ = true;
if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_POPUP ||
extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_DIALOG ||
- extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR) {
+ extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR ||
+ extension_host_type_ == chrome::VIEW_TYPE_APP_SHELL) {
#if defined(TOOLKIT_VIEWS) || defined(OS_MACOSX)
if (view_.get())
view_->DidStopLoading();
@@ -354,6 +359,8 @@ void ExtensionHost::DidStopLoading() {
} else if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR) {
UMA_HISTOGRAM_TIMES("Extensions.InfobarLoadTime",
since_created_.Elapsed());
+ } else if (extension_host_type_ == chrome::VIEW_TYPE_APP_SHELL) {
+ UMA_HISTOGRAM_TIMES("Extensions.ShellLoadTime", since_created_.Elapsed());
}
}
}
@@ -389,7 +396,8 @@ void ExtensionHost::CloseContents(WebContents* contents) {
if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_POPUP ||
extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_DIALOG ||
extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE ||
- extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR) {
+ extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR ||
+ extension_host_type_ == chrome::VIEW_TYPE_APP_SHELL) {
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
content::Source<Profile>(profile_),
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | chrome/browser/extensions/extension_process_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698