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 | |
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')
-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 | ||||
-rw-r--r-- | chrome/chrome.xcodeproj/project.pbxproj | 2 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.h | 14 | ||||
-rw-r--r-- | chrome/views/window_delegate.h | 2 |
7 files changed, 32 insertions, 29 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) { diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj index daa33e87..50d2675 100644 --- a/chrome/chrome.xcodeproj/project.pbxproj +++ b/chrome/chrome.xcodeproj/project.pbxproj @@ -250,6 +250,7 @@ 70F87705D5BDD8E76A712336 /* ssl_host_state.cc in Sources */ = {isa = PBXBuildFile; fileRef = F60D7722C1302E1EC789B67A /* ssl_host_state.cc */; }; 71784BA931A610A94A7FEDC9 /* history_querying_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF9F50E9D48F7009A6919 /* history_querying_unittest.cc */; }; 7442556F908264C52BEBFE4D /* starred_url_database_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BFA090E9D48F7009A6919 /* starred_url_database_unittest.cc */; }; + 7D296C6300A94C463E1E7BC7 /* interstitial_page.cc in Sources */ = {isa = PBXBuildFile; fileRef = B6CCB9D10F1EC32700106F0D /* interstitial_page.cc */; }; 7D7BF08CA9978F8782A1E82D /* browser_shutdown.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF8460E9D4839009A6919 /* browser_shutdown.cc */; }; 7F84A3FF0F6102F46E0E5155 /* history_publisher.cc in Sources */ = {isa = PBXBuildFile; fileRef = 269003C4E493789D82B6B0F9 /* history_publisher.cc */; }; 81B6908E490BFDF37C4BA7CE /* v8_unit_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 759B3A1B81E261598122B03B /* v8_unit_test.cc */; }; @@ -5426,6 +5427,7 @@ 4D7BFA240E9D4905009A6919 /* in_memory_database.cc in Sources */, 4D7BFA260E9D4908009A6919 /* in_memory_history_backend.cc in Sources */, 96DF109FEE9B09B11690F1FA /* infobar_delegate.cc in Sources */, + 7D296C6300A94C463E1E7BC7 /* interstitial_page.cc in Sources */, E45075B70F1505DD003BE099 /* keyword_provider.cc in Sources */, 4D7BF9A00E9D4875009A6919 /* meta_table_helper.cc in Sources */, B555B2230F21506300F751B9 /* metrics_log.cc in Sources */, diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index aebbc8d..3c7f710 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -467,20 +467,6 @@ class FaviconStatus { GURL url_; }; -class InterstitialPage { - public: - InterstitialPage(WebContents* tab, bool new_navigation, const GURL& url) { - NOTIMPLEMENTED(); - } - virtual void DontProceed() { NOTIMPLEMENTED(); } - virtual void Proceed() { NOTIMPLEMENTED(); } - virtual void Show() { NOTIMPLEMENTED(); } - WebContents* tab() const { - NOTIMPLEMENTED(); - return NULL; - } -}; - class TabContents : public PageNavigator, public NotificationObserver { public: enum InvalidateTypes { diff --git a/chrome/views/window_delegate.h b/chrome/views/window_delegate.h index 4c496bb..e77f9c2 100644 --- a/chrome/views/window_delegate.h +++ b/chrome/views/window_delegate.h @@ -143,7 +143,7 @@ class WindowDelegate { void ReleaseWindow(); private: - friend Window; + friend class Window; // This is a little unusual. We use a scoped_ptr here because it's // initialized to NULL automatically. We do this because we want to allow // people using this helper to not have to call a ctor on this object. |