| Index: extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
| diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
| index 1cb98b50b5b8120769c7f6d96cedb17a29feecb6..6ab51b552cba245db9ffcc146bdd08185fcae0c3 100644
|
| --- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
| +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
| @@ -45,8 +45,7 @@ ExtensionOptionsGuest::ExtensionOptionsGuest(
|
| guest_instance_id),
|
| extension_options_guest_delegate_(
|
| extensions::ExtensionsAPIClient::Get()
|
| - ->CreateExtensionOptionsGuestDelegate(this)),
|
| - has_navigated_(false) {
|
| + ->CreateExtensionOptionsGuestDelegate(this)) {
|
| }
|
|
|
| ExtensionOptionsGuest::~ExtensionOptionsGuest() {
|
| @@ -62,6 +61,10 @@ extensions::GuestViewBase* ExtensionOptionsGuest::Create(
|
| guest_instance_id);
|
| }
|
|
|
| +bool ExtensionOptionsGuest::CanRunInDetachedState() const {
|
| + return true;
|
| +}
|
| +
|
| void ExtensionOptionsGuest::CreateWebContents(
|
| const base::DictionaryValue& create_params,
|
| const WebContentsCreatedCallback& callback) {
|
| @@ -117,18 +120,6 @@ void ExtensionOptionsGuest::CreateWebContents(
|
| callback.Run(WebContents::Create(params));
|
| }
|
|
|
| -void ExtensionOptionsGuest::DidAttachToEmbedder() {
|
| - // We should not re-navigate on reattachment.
|
| - if (has_navigated_)
|
| - return;
|
| -
|
| - web_contents()->GetController().LoadURL(options_page_,
|
| - content::Referrer(),
|
| - ui::PAGE_TRANSITION_LINK,
|
| - std::string());
|
| - has_navigated_ = true;
|
| -}
|
| -
|
| void ExtensionOptionsGuest::DidInitialize(
|
| const base::DictionaryValue& create_params) {
|
| extension_function_dispatcher_.reset(
|
| @@ -136,6 +127,10 @@ void ExtensionOptionsGuest::DidInitialize(
|
| if (extension_options_guest_delegate_) {
|
| extension_options_guest_delegate_->DidInitialize();
|
| }
|
| + web_contents()->GetController().LoadURL(options_page_,
|
| + content::Referrer(),
|
| + ui::PAGE_TRANSITION_LINK,
|
| + std::string());
|
| }
|
|
|
| void ExtensionOptionsGuest::DidStopLoading() {
|
| @@ -165,6 +160,14 @@ void ExtensionOptionsGuest::GuestSizeChangedDueToAutoSize(
|
| options.ToValue()));
|
| }
|
|
|
| +bool ExtensionOptionsGuest::IsAutoSizeSupported() const {
|
| + return true;
|
| +}
|
| +
|
| +bool ExtensionOptionsGuest::IsPreferredSizeModeEnabled() const {
|
| + return true;
|
| +}
|
| +
|
| void ExtensionOptionsGuest::OnPreferredSizeChanged(const gfx::Size& pref_size) {
|
| extension_options_internal::PreferredSizeChangedOptions options;
|
| options.width = pref_size.width();
|
| @@ -174,14 +177,6 @@ void ExtensionOptionsGuest::OnPreferredSizeChanged(const gfx::Size& pref_size) {
|
| options.ToValue()));
|
| }
|
|
|
| -bool ExtensionOptionsGuest::IsAutoSizeSupported() const {
|
| - return true;
|
| -}
|
| -
|
| -bool ExtensionOptionsGuest::IsPreferredSizeModeEnabled() const {
|
| - return true;
|
| -}
|
| -
|
| content::WebContents* ExtensionOptionsGuest::GetAssociatedWebContents() const {
|
| return web_contents();
|
| }
|
|
|