diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 21:49:38 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 21:49:38 +0000 |
commit | 5fac9623175cb7bda27ccc079ea19b3f90471149 (patch) | |
tree | 9d713762548943c72d2b699146dda5d46512fc04 /chrome | |
parent | 0967bb557cdfe4847074f49095bba57170ca5439 (diff) | |
download | chromium_src-5fac9623175cb7bda27ccc079ea19b3f90471149.zip chromium_src-5fac9623175cb7bda27ccc079ea19b3f90471149.tar.gz chromium_src-5fac9623175cb7bda27ccc079ea19b3f90471149.tar.bz2 |
Enable render_widget_host, render_view_host and backing_store. Remove the RenderWidgetHostManager from the scaffolding.
Review URL: http://codereview.chromium.org/20044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 2 | ||||
-rw-r--r-- | chrome/browser/browser.scons | 1 | ||||
-rw-r--r-- | chrome/browser/browser_about_handler.cc | 1 | ||||
-rw-r--r-- | chrome/browser/browser_prefs.cc | 2 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.cc | 17 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.h | 1 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host_delegate.h | 2 | ||||
-rw-r--r-- | chrome/browser/tab_contents/interstitial_page.cc | 2 | ||||
-rw-r--r-- | chrome/browser/tab_contents/interstitial_page.h | 1 | ||||
-rw-r--r-- | chrome/browser/tab_contents/web_contents.h | 4 | ||||
-rw-r--r-- | chrome/chrome.xcodeproj/project.pbxproj | 6 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.cc | 11 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.h | 162 |
13 files changed, 79 insertions, 133 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index a613f78..04ca9d0 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -4,7 +4,9 @@ #include "chrome/browser/automation/automation_provider.h" +#include "base/message_loop.h" #include "base/path_service.h" +#include "base/thread.h" #include "chrome/app/chrome_dll_resource.h" #include "chrome/browser/app_modal_dialog_queue.h" #include "chrome/browser/automation/automation_provider_list.h" diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons index d5ba3c7..1513494 100644 --- a/chrome/browser/browser.scons +++ b/chrome/browser/browser.scons @@ -756,7 +756,6 @@ if not env.Bit('windows'): 'printing/printed_page.cc', 'printing/printer_query.cc', 'printing/win_printing_context.cc', - 'renderer_host/render_view_host.cc', 'renderer_host/cross_site_resource_handler.cc', 'renderer_host/resource_dispatcher_host.cc', 'repost_form_warning_dialog.cc', diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index 075a8b0..a9028d7 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -12,6 +12,7 @@ #include "base/stats_table.h" #include "base/string_piece.h" #include "base/string_util.h" +#include "base/thread.h" #include "base/tracked_objects.h" #include "chrome/app/locales/locale_settings.h" #include "chrome/browser/browser.h" diff --git a/chrome/browser/browser_prefs.cc b/chrome/browser/browser_prefs.cc index 57bec82..bcd754c 100644 --- a/chrome/browser/browser_prefs.cc +++ b/chrome/browser/browser_prefs.cc @@ -62,8 +62,8 @@ void RegisterAllPrefs(PrefService* user_prefs, PrefService* local_state) { DownloadManager::RegisterUserPrefs(user_prefs); PasswordManager::RegisterUserPrefs(user_prefs); SSLManager::RegisterUserPrefs(user_prefs); - TabContents::RegisterUserPrefs(user_prefs); #endif + TabContents::RegisterUserPrefs(user_prefs); TemplateURLPrepopulateData::RegisterUserPrefs(user_prefs); WebContents::RegisterUserPrefs(user_prefs); } diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index b6629e9..b6dd5a9 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -13,14 +13,12 @@ #include "chrome/app/result_codes.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/cross_site_request_manager.h" -#include "chrome/browser/debugger/debugger_wrapper.h" #include "chrome/browser/profile.h" #include "chrome/browser/metrics/user_metrics.h" +#include "chrome/browser/renderer_host/renderer_security_policy.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/render_view_host_delegate.h" #include "chrome/browser/renderer_host/render_widget_host.h" -#include "chrome/browser/renderer_host/render_widget_host_view.h" -#include "chrome/browser/renderer_host/renderer_security_policy.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/site_instance.h" #include "chrome/browser/tab_contents/web_contents.h" @@ -28,6 +26,13 @@ #include "chrome/common/thumbnail_score.h" #include "net/base/net_util.h" #include "skia/include/SkBitmap.h" +#include "webkit/glue/autofill_form.h" + +#if defined(OS_WIN) +// TODO(port): remove these when stubs are filled in +#include "chrome/browser/debugger/debugger_wrapper.h" +#include "chrome/browser/renderer_host/render_widget_host_view.h" +#endif using base::TimeDelta; @@ -79,12 +84,13 @@ RenderViewHost::RenderViewHost(SiteInstance* instance, base::WaitableEvent* modal_dialog_event) : RenderWidgetHost(instance->GetProcess(), routing_id), instance_(instance), - enable_dom_ui_bindings_(false), - enable_external_host_bindings_(false), delegate_(delegate), renderer_initialized_(false), waiting_for_drag_context_response_(false), debugger_attached_(false), + enable_dom_ui_bindings_(false), + pending_request_id_(0), + enable_external_host_bindings_(false), modal_dialog_count_(0), navigations_suspended_(false), suspended_nav_message_(NULL), @@ -1084,7 +1090,6 @@ void RenderViewHost::OnMsgRunJavaScriptMessage( StopHangMonitorTimeout(); if (modal_dialog_count_++ == 0) modal_dialog_event_->Signal(); - bool did_suppress_message = false; delegate_->RunJavaScriptMessage(message, default_prompt, flags, reply_msg, &are_javascript_messages_suppressed_); } diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h index ea44f01..0cd052e 100644 --- a/chrome/browser/renderer_host/render_view_host.h +++ b/chrome/browser/renderer_host/render_view_host.h @@ -21,6 +21,7 @@ #include "webkit/glue/password_form_dom_manager.h" #include "webkit/glue/window_open_disposition.h" +class AutofillForm; class NavigationEntry; class RenderViewHostDelegate; class SiteInstance; diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h index 5a39b91..27662d7 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.h +++ b/chrome/browser/renderer_host/render_view_host_delegate.h @@ -9,11 +9,11 @@ #include <vector> #include "base/basictypes.h" -#include "chrome/browser/autofill_manager.h" #include "chrome/common/render_messages.h" #include "net/base/load_states.h" #include "webkit/glue/webpreferences.h" +class AutofillForm; class NavigationEntry; class Profile; class RenderProcessHost; diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc index c7e7d49..3351684 100644 --- a/chrome/browser/tab_contents/interstitial_page.cc +++ b/chrome/browser/tab_contents/interstitial_page.cc @@ -4,6 +4,8 @@ #include "chrome/browser/tab_contents/interstitial_page.h" +#include "base/message_loop.h" +#include "base/thread.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/browser_resources.h" diff --git a/chrome/browser/tab_contents/interstitial_page.h b/chrome/browser/tab_contents/interstitial_page.h index eb18b60..d51d099 100644 --- a/chrome/browser/tab_contents/interstitial_page.h +++ b/chrome/browser/tab_contents/interstitial_page.h @@ -11,6 +11,7 @@ #include "chrome/common/notification_registrar.h" #include "googleurl/src/gurl.h" +class MessageLoop; class NavigationEntry; class WebContents; diff --git a/chrome/browser/tab_contents/web_contents.h b/chrome/browser/tab_contents/web_contents.h index 99f3c8c..939fe67 100644 --- a/chrome/browser/tab_contents/web_contents.h +++ b/chrome/browser/tab_contents/web_contents.h @@ -8,6 +8,8 @@ #include "base/basictypes.h" #include "base/hash_tables.h" #include "chrome/browser/cancelable_request.h" +#include "chrome/browser/renderer_host/render_view_host_delegate.h" +#include "chrome/browser/tab_contents/render_view_host_manager.h" #include "net/base/load_states.h" #include "webkit/glue/password_form.h" #include "webkit/glue/webpreferences.h" @@ -19,9 +21,7 @@ #include "chrome/browser/download/save_package.h" #include "chrome/browser/fav_icon_helper.h" #include "chrome/browser/printing/print_view_manager.h" -#include "chrome/browser/renderer_host/render_view_host_delegate.h" #include "chrome/browser/shell_dialogs.h" -#include "chrome/browser/tab_contents/render_view_host_manager.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/gears_api.h" #endif diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj index 8193541..9bc9a4d 100644 --- a/chrome/chrome.xcodeproj/project.pbxproj +++ b/chrome/chrome.xcodeproj/project.pbxproj @@ -293,6 +293,9 @@ E434BBEB0F37DFA500B665C7 /* renderer_security_policy.cc in Sources */ = {isa = PBXBuildFile; fileRef = A76E42980F28ECAD009A7E88 /* renderer_security_policy.cc */; }; E434BE130F38DDA700B665C7 /* renderer_security_policy_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = A76E429A0F28ECAD009A7E88 /* renderer_security_policy_unittest.cc */; }; E434BE3D0F3901A100B665C7 /* mock_render_thread.cc in Sources */ = {isa = PBXBuildFile; fileRef = E434BE240F38DF4300B665C7 /* mock_render_thread.cc */; }; + E434BFA40F3A03E200B665C7 /* render_widget_host.cc in Sources */ = {isa = PBXBuildFile; fileRef = A76E42A30F28ED73009A7E88 /* render_widget_host.cc */; }; + E434BFD90F3A074300B665C7 /* backing_store.cc in Sources */ = {isa = PBXBuildFile; fileRef = A7C613C40F30D82C008CEE5D /* backing_store.cc */; }; + E434C0280F3A0C0100B665C7 /* render_view_host.cc in Sources */ = {isa = PBXBuildFile; fileRef = A76E429D0F28ED73009A7E88 /* render_view_host.cc */; }; E43A770B0F1660EA00ABD5D1 /* automation_resource_tracker.cc in Sources */ = {isa = PBXBuildFile; fileRef = E48FB9680EC4EA270052B72B /* automation_resource_tracker.cc */; }; E43A770D0F16610300ABD5D1 /* chrome_plugin_browsing_context.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF85B0E9D4839009A6919 /* chrome_plugin_browsing_context.cc */; }; E43A77110F16613700ABD5D1 /* chrome_url_request_context.cc in Sources */ = {isa = PBXBuildFile; fileRef = E43A77100F16613700ABD5D1 /* chrome_url_request_context.cc */; }; @@ -4535,6 +4538,7 @@ 4D7BFA1E0E9D48FD009A6919 /* archived_database.cc in Sources */, E45075DC0F150A53003BE099 /* async_resource_handler.cc in Sources */, E43A770B0F1660EA00ABD5D1 /* automation_resource_tracker.cc in Sources */, + E434BFD90F3A074300B665C7 /* backing_store.cc in Sources */, 671555F7DF06E224B646E5D2 /* backing_store_posix.cc in Sources */, E40CC5EE0F2E34C100708647 /* base_history_model.cc in Sources */, 4D7BFAEE0E9D49E5009A6919 /* bloom_filter.cc in Sources */, @@ -4604,8 +4608,10 @@ E4F324500EE5CF7C002533CE /* query_parser.cc in Sources */, E4F3247A0EE5D17E002533CE /* referrer.cc in Sources */, A7C612990F30D63D008CEE5D /* render_process_host.cc in Sources */, + E434C0280F3A0C0100B665C7 /* render_view_host.cc in Sources */, 94542322A5E5A8F4FDDAB7F0 /* render_view_host_manager.cc in Sources */, E434BBBF0F37D6DB00B665C7 /* render_widget_helper.cc in Sources */, + E434BFA40F3A03E200B665C7 /* render_widget_host.cc in Sources */, E434BBEB0F37DFA500B665C7 /* renderer_security_policy.cc in Sources */, 4D7BFAF30E9D49EF009A6919 /* safe_browsing_database.cc in Sources */, E48FB9590EC4E9C10052B72B /* safe_browsing_database_bloom.cc in Sources */, diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc index 9098742..5cee9ab 100644 --- a/chrome/common/temp_scaffolding_stubs.cc +++ b/chrome/common/temp_scaffolding_stubs.cc @@ -330,3 +330,14 @@ void ResourceDispatcherHost::CancelRequestsForRenderView(int, int) { void ProcessWatcher::EnsureProcessTerminated(int) { NOTIMPLEMENTED(); } + +#if defined(OS_MACOSX) +WebCursor::WebCursor() { +} +WebCursor::~WebCursor() { +} +bool WebCursor::Deserialize(const Pickle* pickle, void** iter) { + NOTIMPLEMENTED(); + return false; +} +#endif diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index cab8c87..fe3dc2a 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -23,9 +23,14 @@ #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/tab_contents_type.h" +#include "chrome/browser/renderer_host/render_view_host.h" +#include "chrome/browser/renderer_host/render_widget_host.h" +#include "chrome/browser/renderer_host/render_view_host_delegate.h" #include "chrome/common/navigation_types.h" #include "chrome/common/notification_service.h" #include "chrome/common/page_transition_types.h" +#include "chrome/common/pref_names.h" +#include "chrome/common/pref_service.h" #include "chrome/common/render_messages.h" #include "googleurl/src/gurl.h" #include "skia/include/SkBitmap.h" @@ -352,6 +357,9 @@ class ResourceDispatcherHost { class DebuggerWrapper : public base::RefCountedThreadSafe<DebuggerWrapper> { public: explicit DebuggerWrapper(int port) {} + void DebugMessage(const std::wstring&) {} + void OnDebugAttach() {} + void OnDebugDisconnect() {} }; namespace views { @@ -364,16 +372,6 @@ class AcceleratorHandler { //--------------------------------------------------------------------------- // These stubs are for Browser -class RenderViewHostDelegate { - public: - class View { - public: - }; - class Save { - public: - }; -}; - class SavePackage : public base::RefCountedThreadSafe<SavePackage>, public RenderViewHostDelegate::Save { public: @@ -413,6 +411,13 @@ class SavePackage : public base::RefCountedThreadSafe<SavePackage>, NOTIMPLEMENTED(); return true; } + virtual void OnReceivedSavableResourceLinksForCurrentPage( + const std::vector<GURL>& resources_list, + const std::vector<GURL>& referrers_list, + const std::vector<GURL>& frames_list) { NOTIMPLEMENTED(); } + virtual void OnReceivedSerializedHtmlData(const GURL& frame_url, + const std::string& data, + int32 status) { NOTIMPLEMENTED(); } }; class DebuggerWindow : public base::RefCountedThreadSafe<DebuggerWindow> { @@ -590,69 +595,17 @@ class RenderWidgetHostView { NOTIMPLEMENTED(); return false; } - virtual void SetSize(gfx::Size) { NOTIMPLEMENTED(); } -}; - -class RenderWidgetHost { - public: - RenderWidgetHost() : process_(), view_() { } - RenderProcessHost* process() const { - NOTIMPLEMENTED(); - return process_; - } - RenderWidgetHostView* view() const { - NOTIMPLEMENTED(); - return view_; - } - private: - RenderProcessHost* process_; - RenderWidgetHostView* view_; -}; - -class RenderViewHost : public RenderWidgetHost { - public: - bool HasUnloadListener() const { - NOTIMPLEMENTED(); - return false; - } - void FirePageBeforeUnload() { NOTIMPLEMENTED(); } - void SetPageEncoding(const std::wstring& encoding) { NOTIMPLEMENTED(); } - SiteInstance* site_instance() const { - NOTIMPLEMENTED(); + virtual gfx::NativeView GetPluginNativeView() { + NOTIMPLEMENTED(); return NULL; } - void NavigateToEntry(const NavigationEntry& entry, bool is_reload) { - NOTIMPLEMENTED(); - } - void Cut() { NOTIMPLEMENTED(); } - void Copy() { NOTIMPLEMENTED(); } - void Paste() { NOTIMPLEMENTED(); } - void DisassociateFromPopupCount() { NOTIMPLEMENTED(); } - void PopupNotificationVisibilityChanged(bool) { NOTIMPLEMENTED(); } - void GetApplicationInfo(int32 page_id) { NOTIMPLEMENTED(); } - bool PrintPages() { - NOTIMPLEMENTED(); - return false; - } - void SetInitialFocus(bool) { NOTIMPLEMENTED(); } - void UnloadListenerHasFired() { NOTIMPLEMENTED(); } - bool IsRenderViewLive() { - NOTIMPLEMENTED(); - return true; - } - void FileSelected(const std::wstring&) { NOTIMPLEMENTED(); } - void MultiFilesSelected(const std::vector<std::wstring>&) { - NOTIMPLEMENTED(); - } - bool CreateRenderView() { - NOTIMPLEMENTED(); - return true; - } - void SetAlternateErrorPageURL(const GURL&) { NOTIMPLEMENTED(); } - void UpdateWebPreferences(WebPreferences) { NOTIMPLEMENTED(); } - void ReservePageIDRange(int) { NOTIMPLEMENTED(); } + virtual void UpdateCursorIfOverSelf() { NOTIMPLEMENTED(); } + virtual void SetTooltipText(const std::wstring& tooltip_text) + { NOTIMPLEMENTED(); } + virtual void SetSize(gfx::Size) { NOTIMPLEMENTED(); } }; + class LoadNotificationDetails { public: LoadNotificationDetails(const GURL&, PageTransition::Type, @@ -746,6 +699,9 @@ class TabContents : public NotificationObserver { void AddInfoBar(InfoBarDelegate* delegate) { NOTIMPLEMENTED(); } void OpenURL(const GURL&, const GURL&, WindowOpenDisposition, PageTransition::Type) { NOTIMPLEMENTED(); } + static void RegisterUserPrefs(PrefService* prefs) { + prefs->RegisterBooleanPref(prefs::kBlockPopups, false); + } protected: typedef std::vector<ConstrainedWindow*> ConstrainedWindowList; ConstrainedWindowList child_windows_; @@ -935,6 +891,21 @@ class WebContentsView : public RenderViewHostDelegate::View { } void RenderWidgetHostDestroyed(RenderWidgetHost*) { NOTIMPLEMENTED(); } void SetPageTitle(const std::wstring&) { NOTIMPLEMENTED(); } + virtual void CreateNewWindow(int, + base::WaitableEvent*) { NOTIMPLEMENTED(); } + virtual void CreateNewWidget(int, bool) { NOTIMPLEMENTED(); } + virtual void ShowCreatedWindow(int, WindowOpenDisposition, + const gfx::Rect&, bool) { NOTIMPLEMENTED(); } + virtual void ShowCreatedWidget(int, const gfx::Rect&) { NOTIMPLEMENTED(); } + virtual void ShowContextMenu( + const ViewHostMsg_ContextMenu_Params&) { NOTIMPLEMENTED(); } + virtual void StartDragging(const WebDropData&) { NOTIMPLEMENTED(); } + virtual void UpdateDragCursor(bool) { NOTIMPLEMENTED(); } + virtual void TakeFocus(bool) { NOTIMPLEMENTED(); } + virtual void HandleKeyboardEvent(const WebKeyboardEvent&) + { NOTIMPLEMENTED(); } + virtual void OnFindReply(int, int, const gfx::Rect&, int, + bool) { NOTIMPLEMENTED(); } }; class WebContentsViewWin : public WebContentsView { @@ -942,59 +913,6 @@ class WebContentsViewWin : public WebContentsView { WebContentsViewWin(WebContents*) { } }; -class RenderViewHostFactory { - public: -}; - -class RenderViewHostManager { - public: - class Delegate { - public: - }; - RenderViewHostManager(RenderViewHostFactory*, RenderViewHostDelegate*, - Delegate* delegate) - : render_view_host_(new RenderViewHost), interstitial_page_() { } - RenderViewHost* current_host() const { - NOTIMPLEMENTED(); - return render_view_host_; - } - void Init(Profile*, SiteInstance*, int, base::WaitableEvent*) { - NOTIMPLEMENTED(); - } - void Shutdown() { NOTIMPLEMENTED(); } - InterstitialPage* interstitial_page() const { - return interstitial_page_; - } - void set_interstitial_page(InterstitialPage* interstitial_page) { - interstitial_page_ = interstitial_page; - } - void remove_interstitial_page() { interstitial_page_ = NULL; } - RenderWidgetHostView* current_view() const { - if (!render_view_host_) return NULL; - return render_view_host_->view(); - } - void CrossSiteNavigationCanceled() { NOTIMPLEMENTED(); } - void ShouldClosePage(bool) { NOTIMPLEMENTED(); } - void OnCrossSiteResponse(int, int) { NOTIMPLEMENTED(); } - RenderViewHost* Navigate(const NavigationEntry&) { - NOTIMPLEMENTED(); - return render_view_host_; - } - void Stop() { NOTIMPLEMENTED(); } - void OnJavaScriptMessageBoxClosed(IPC::Message*, bool, - const std::wstring&) { NOTIMPLEMENTED(); } - void SetIsLoading(bool) { NOTIMPLEMENTED(); } - void DidNavigateMainFrame(RenderViewHost*) { NOTIMPLEMENTED(); } - void RendererAbortedProvisionalLoad(RenderViewHost*) { NOTIMPLEMENTED(); } - bool ShouldCloseTabOnUnresponsiveRenderer() { - NOTIMPLEMENTED(); - return false; - } - private: - RenderViewHost* render_view_host_; - InterstitialPage* interstitial_page_; -}; - class WebApp : public base::RefCountedThreadSafe<WebApp> { public: class Observer { |