#include "extensions/browser/view_type_utils.h"
#include "extensions/common/api/app_runtime.h"
#include "extensions/common/extension_messages.h"
-#include "extensions/common/switches.h"
#include "extensions/strings/grit/extensions_strings.h"
#include "ipc/ipc_message_macros.h"
// static
GuestViewBase* AppViewGuest::Create(content::BrowserContext* browser_context,
int guest_instance_id) {
- if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
- extensions::switches::kEnableAppView)) {
- return NULL;
- }
return new AppViewGuest(browser_context, guest_instance_id);
}
return;
}
- ProcessManager* process_manager =
- ExtensionSystem::Get(browser_context())->process_manager();
+ ProcessManager* process_manager = ProcessManager::Get(browser_context());
ExtensionHost* host =
process_manager->GetBackgroundHostForExtension(guest_extension->id());
DCHECK(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.
+ if (!url_.is_valid())
+ return;
+
web_contents()->GetController().LoadURL(
url_, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
+ url_ = GURL();
}
void AppViewGuest::DidInitialize() {