| 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_),
|
|
|