diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-18 21:43:00 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-18 21:43:00 +0000 |
commit | a165a0510c4b684d47ca80a4a2868c98ba01dd49 (patch) | |
tree | 9507d6a91e5fa4593a85aa92a8e9f6233e5f6dd9 /chrome/browser | |
parent | f224d57a86d8ed1ed6c4bca3c8a7150bf3c0ed14 (diff) | |
download | chromium_src-a165a0510c4b684d47ca80a4a2868c98ba01dd49.zip chromium_src-a165a0510c4b684d47ca80a4a2868c98ba01dd49.tar.gz chromium_src-a165a0510c4b684d47ca80a4a2868c98ba01dd49.tar.bz2 |
Make interstitial_page.cc compile on Posix.
Review URL: http://codereview.chromium.org/21467
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9971 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser.cc | 2 | ||||
-rw-r--r-- | chrome/browser/browser.scons | 1 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_blocking_page.h | 5 | ||||
-rw-r--r-- | chrome/browser/tab_contents/interstitial_page.cc | 35 |
4 files changed, 29 insertions, 14 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index a5ce91a..147374e 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -19,6 +19,7 @@ #include "chrome/browser/sessions/session_service.h" #include "chrome/browser/sessions/session_types.h" #include "chrome/browser/sessions/tab_restore_service.h" +#include "chrome/browser/tab_contents/interstitial_page.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/site_instance.h" @@ -60,7 +61,6 @@ #include "chrome/browser/options_window.h" #include "chrome/browser/ssl/ssl_error_info.h" #include "chrome/browser/status_bubble.h" -#include "chrome/browser/tab_contents/interstitial_page.h" #include "chrome/browser/tab_contents/web_contents_view.h" #include "chrome/browser/task_manager.h" #include "chrome/browser/user_data_manager.h" diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons index 9d3f3d9..faeb393 100644 --- a/chrome/browser/browser.scons +++ b/chrome/browser/browser.scons @@ -741,7 +741,6 @@ if not env.Bit('windows'): 'sandbox_policy.cc', 'search_engines/template_url_fetcher.cc', 'shell_integration.cc', - 'tab_contents/interstitial_page.cc', 'tab_contents/native_ui_contents.cc', 'tab_contents/render_view_context_menu.cc', 'tab_contents/render_view_context_menu_controller.cc', diff --git a/chrome/browser/ssl/ssl_blocking_page.h b/chrome/browser/ssl/ssl_blocking_page.h index cb76e41..e6c6971 100644 --- a/chrome/browser/ssl/ssl_blocking_page.h +++ b/chrome/browser/ssl/ssl_blocking_page.h @@ -8,12 +8,7 @@ #include <string> #include "chrome/browser/ssl/ssl_manager.h" - -#if defined(OS_WIN) #include "chrome/browser/tab_contents/interstitial_page.h" -#elif defined(OS_POSIX) -#include "chrome/common/temp_scaffolding_stubs.h" -#endif class DictionaryValue; 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) { |