diff options
Diffstat (limited to 'chrome/browser/tab_contents/interstitial_page.cc')
-rw-r--r-- | chrome/browser/tab_contents/interstitial_page.cc | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc index 9685a4f..916e3be 100644 --- a/chrome/browser/tab_contents/interstitial_page.cc +++ b/chrome/browser/tab_contents/interstitial_page.cc @@ -9,16 +9,19 @@ #include "chrome/browser/browser.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/dom_operation_notification_details.h" -#include "chrome/browser/renderer_host/render_widget_host_view_win.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/web_contents.h" -#include "chrome/browser/tab_contents/web_contents_view_win.h" #include "chrome/common/notification_service.h" -#include "chrome/views/window.h" #include "chrome/views/window_delegate.h" #include "net/base/escape.h" +#if defined(OS_WIN) +#include "chrome/browser/renderer_host/render_widget_host_view_win.h" +#include "chrome/browser/tab_contents/web_contents_view_win.h" +#include "chrome/views/window.h" +#endif + // Generated by GRIT #include "browser_resources.h" @@ -75,14 +78,14 @@ InterstitialPage::InterstitialPage(WebContents* tab, const GURL& url) : tab_(tab), url_(url), - action_taken_(false), - enabled_(true), new_navigation_(new_navigation), + enabled_(true), + action_taken_(false), + render_view_host_(NULL), original_rvh_process_id_(tab->render_view_host()->process()->host_id()), original_rvh_id_(tab->render_view_host()->routing_id()), - render_view_host_(NULL), - resource_dispatcher_host_notified_(false), should_revert_tab_title_(false), + resource_dispatcher_host_notified_(false), ui_loop_(MessageLoop::current()) { InitInterstitialPageMap(); // It would be inconsistent to create an interstitial with no new navigation @@ -210,6 +213,7 @@ void InterstitialPage::Observe(NotificationType type, } RenderViewHost* InterstitialPage::CreateRenderViewHost() { +#if defined(OS_WIN) RenderViewHost* render_view_host = new RenderViewHost( SiteInstance::CreateSiteInstance(tab()->profile()), this, MSG_ROUTING_NONE, NULL); @@ -226,6 +230,13 @@ RenderViewHost* InterstitialPage::CreateRenderViewHost() { render_view_host->AllowDomAutomationBindings(); return render_view_host; +#else + // TODO(port): RenderWidgetHost* is implemented, but Create and + // set_parent_hwnd are specific to RenderWidgetHostWin, so this should + // probably be refactored. + NOTIMPLEMENTED(); + return NULL; +#endif } void InterstitialPage::Proceed() { @@ -287,7 +298,12 @@ void InterstitialPage::DontProceed() { } void InterstitialPage::SetSize(const gfx::Size& size) { +#if defined(OS_WIN) render_view_host_->view()->SetSize(size); +#else + // TODO(port): do Mac or Linux need to SetSize? + NOTIMPLEMENTED(); +#endif } Profile* InterstitialPage::GetProfile() const { @@ -297,6 +313,7 @@ Profile* InterstitialPage::GetProfile() const { void InterstitialPage::DidNavigate( RenderViewHost* render_view_host, const ViewHostMsg_FrameNavigate_Params& params) { +#if defined(OS_WIN) // A fast user could have navigated away from the page that triggered the // interstitial while the interstitial was loading, that would have disabled // us. In that case we can dismiss ourselves. @@ -314,6 +331,10 @@ void InterstitialPage::DidNavigate( // by the UI tests) expects to consider a navigation as complete. Without this, // navigating in a UI test to a URL that triggers an interstitial would hang. tab_->SetIsLoading(false, NULL); +#else + // TODO(port): we need RenderViewHost. + NOTIMPLEMENTED(); +#endif } void InterstitialPage::RendererGone(RenderViewHost* render_view_host) { |