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

Unified Diff: extensions/browser/guest_view/app_view/app_view_guest.cc

Issue 845363004: <webview>, <appview> and <extensionoptions> can run in a detached state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 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
Index: extensions/browser/guest_view/app_view/app_view_guest.cc
diff --git a/extensions/browser/guest_view/app_view/app_view_guest.cc b/extensions/browser/guest_view/app_view/app_view_guest.cc
index afc38afcebb72e0e97a8f05090352f91c7188dc8..08ea9b24b7bb3a65bdf72a62217952e9d8df1892 100644
--- a/extensions/browser/guest_view/app_view/app_view_guest.cc
+++ b/extensions/browser/guest_view/app_view/app_view_guest.cc
@@ -165,12 +165,8 @@ bool AppViewGuest::CheckMediaAccessPermission(
web_contents, security_origin, type, guest_extension);
}
-const char* AppViewGuest::GetAPINamespace() const {
- return appview::kEmbedderAPINamespace;
-}
-
-int AppViewGuest::GetTaskPrefix() const {
- return IDS_EXTENSION_TASK_MANAGER_APPVIEW_TAG_PREFIX;
+bool AppViewGuest::CanRunInDetachedState() const {
+ return true;
}
void AppViewGuest::CreateWebContents(
@@ -227,22 +223,23 @@ void AppViewGuest::CreateWebContents(
LaunchAppAndFireEvent(make_scoped_ptr(data->DeepCopy()), callback, host);
}
-void AppViewGuest::DidAttachToEmbedder() {
- // This is called after the guest process has been attached to a host
- // element. This means that the host element knows how to route input
- // events to the guest, and the guest knows how to get frames to the
- // embedder.
+void AppViewGuest::DidInitialize(const base::DictionaryValue& create_params) {
+ extension_function_dispatcher_.reset(
+ new ExtensionFunctionDispatcher(browser_context(), this));
+
if (!url_.is_valid())
return;
web_contents()->GetController().LoadURL(
url_, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
- url_ = GURL();
}
-void AppViewGuest::DidInitialize(const base::DictionaryValue& create_params) {
- extension_function_dispatcher_.reset(
- new ExtensionFunctionDispatcher(browser_context(), this));
+const char* AppViewGuest::GetAPINamespace() const {
+ return appview::kEmbedderAPINamespace;
+}
+
+int AppViewGuest::GetTaskPrefix() const {
+ return IDS_EXTENSION_TASK_MANAGER_APPVIEW_TAG_PREFIX;
}
void AppViewGuest::OnRequest(const ExtensionHostMsg_Request_Params& params) {

Powered by Google App Engine
This is Rietveld 408576698