diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 23:44:46 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 23:44:46 +0000 |
commit | 674741939c4b887877859bced1f21e17d64c4b85 (patch) | |
tree | 5e61392d083de8b16461c9ecd037a380b64d496d /chrome/browser | |
parent | 484f6c368b86f901bfc8998d5a21d2165cc83c8a (diff) | |
download | chromium_src-674741939c4b887877859bced1f21e17d64c4b85.zip chromium_src-674741939c4b887877859bced1f21e17d64c4b85.tar.gz chromium_src-674741939c4b887877859bced1f21e17d64c4b85.tar.bz2 |
Commiting the changes from my previous cl that are specific to not including render_messages.h/plugin_message.h unless necessary.
TBR=mpcomplete
Review URL: http://codereview.chromium.org/20059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9189 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
19 files changed, 47 insertions, 62 deletions
diff --git a/chrome/browser/browser_accessibility.cc b/chrome/browser/browser_accessibility.cc index fea5bf2..8dc85b4 100644 --- a/chrome/browser/browser_accessibility.cc +++ b/chrome/browser/browser_accessibility.cc @@ -6,6 +6,7 @@ #include "chrome/browser/browser_accessibility_manager.h" #include "chrome/browser/iaccessible_function_ids.h" +#include "chrome/common/render_messages.h" BrowserAccessibility::BrowserAccessibility() : iaccessible_id_(-1), @@ -546,7 +547,7 @@ bool BrowserAccessibility::RequestAccessibilityInfo(int iaccessible_func_id, input2); } -ViewHostMsg_Accessibility_Out_Params BrowserAccessibility::response() { +const ViewHostMsg_Accessibility_Out_Params& BrowserAccessibility::response() { return BrowserAccessibilityManager::GetInstance()->response(); } diff --git a/chrome/browser/browser_accessibility.h b/chrome/browser/browser_accessibility.h index 5032183..5f2b40d 100644 --- a/chrome/browser/browser_accessibility.h +++ b/chrome/browser/browser_accessibility.h @@ -10,7 +10,9 @@ #include <oleacc.h> -#include "chrome/common/render_messages.h" +#include "base/basictypes.h" + +struct ViewHostMsg_Accessibility_Out_Params; //////////////////////////////////////////////////////////////////////////////// // @@ -144,7 +146,7 @@ class ATL_NO_VTABLE BrowserAccessibility LONG input1, LONG input2); // Accessors. - ViewHostMsg_Accessibility_Out_Params response(); + const ViewHostMsg_Accessibility_Out_Params& response(); HWND parent_hwnd(); // Id to uniquely distinguish this instance in the render-side caching, diff --git a/chrome/browser/browser_accessibility_manager.cc b/chrome/browser/browser_accessibility_manager.cc index b71ecda..69255be 100644 --- a/chrome/browser/browser_accessibility_manager.cc +++ b/chrome/browser/browser_accessibility_manager.cc @@ -116,7 +116,8 @@ bool BrowserAccessibilityManager::RequestAccessibilityInfo( return success; } -ViewHostMsg_Accessibility_Out_Params BrowserAccessibilityManager::response() { +const ViewHostMsg_Accessibility_Out_Params& +BrowserAccessibilityManager::response() { return out_params_; } diff --git a/chrome/browser/browser_accessibility_manager.h b/chrome/browser/browser_accessibility_manager.h index c9c5ad5..dcda60c 100644 --- a/chrome/browser/browser_accessibility_manager.h +++ b/chrome/browser/browser_accessibility_manager.h @@ -15,6 +15,7 @@ class BrowserAccessibility; class RenderProcessHost; class RenderWidgetHost; +struct ViewHostMsg_Accessibility_Out_Params; //////////////////////////////////////////////////////////////////////////////// // @@ -52,7 +53,7 @@ class BrowserAccessibilityManager : public NotificationObserver { LONG input2); // Wrapper function, for cleaner code. - ViewHostMsg_Accessibility_Out_Params response(); + const ViewHostMsg_Accessibility_Out_Params& response(); // Retrieves the parent HWND connected to the provided id. HWND parent_hwnd(int id); diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc index bdc9da3..4e017e8 100644 --- a/chrome/browser/printing/print_view_manager.cc +++ b/chrome/browser/printing/print_view_manager.cc @@ -27,7 +27,6 @@ PrintViewManager::PrintViewManager(WebContents& owner) waiting_to_print_(false), inside_inner_message_loop_(false), waiting_to_show_print_dialog_(false) { - memset(&print_params_, 0, sizeof(print_params_)); } PrintViewManager::~PrintViewManager() { @@ -240,25 +239,6 @@ void PrintViewManager::OnNotifyPrintJobEvent( void PrintViewManager::OnNotifyPrintJobInitEvent( const JobEventDetails& event_details) { - ViewMsg_Print_Params old_print_params(print_params_); - - // Backup the print settings relevant to the renderer. - DCHECK_EQ(print_job_->document(), event_details.document()); - event_details.document()->settings().RenderParams(&print_params_); - print_params_.document_cookie = event_details.document()->cookie(); - DCHECK_GT(print_params_.document_cookie, 0); - - // If settings changed - DCHECK(owner_.render_view_host()); - // Equals() doesn't compare the cookie value. - if (owner_.render_view_host() && - owner_.render_view_host()->IsRenderViewLive() && - (!old_print_params.Equals(print_params_) || - !event_details.document()->page_count())) { - // TODO(maruel): Will never happen, this code is about to be deleted. - NOTREACHED(); - } - // Continue even if owner_.render_view_host() is dead because we may already // have buffered all the necessary pages. switch (event_details.type()) { @@ -460,7 +440,6 @@ void PrintViewManager::ReleasePrintJob() { print_job_->DisconnectSource(); // Don't close the worker thread. print_job_ = NULL; - memset(&print_params_, 0, sizeof(print_params_)); } void PrintViewManager::PrintNowInternal() { diff --git a/chrome/browser/printing/print_view_manager.h b/chrome/browser/printing/print_view_manager.h index 405b180..3cd0272 100644 --- a/chrome/browser/printing/print_view_manager.h +++ b/chrome/browser/printing/print_view_manager.h @@ -5,12 +5,13 @@ #ifndef CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ +#include "base/ref_counted.h" #include "chrome/browser/printing/printed_pages_source.h" #include "chrome/common/notification_observer.h" -#include "chrome/common/render_messages.h" class RenderViewHost; class WebContents; +struct ViewHostMsg_DidPrintPage_Params; namespace printing { @@ -118,9 +119,6 @@ class PrintViewManager : public NotificationObserver, // print_job_ is initialized. bool OpportunisticallyCreatePrintJob(int cookie); - // Cache the last print settings requested to the renderer. - ViewMsg_Print_Params print_params_; - // Manages the low-level talk to the printer. scoped_refptr<PrintJob> print_job_; diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index b6dd5a9..e4dbb77 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -22,6 +22,7 @@ #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/site_instance.h" #include "chrome/browser/tab_contents/web_contents.h" +#include "chrome/common/render_messages.h" #include "chrome/common/resource_bundle.h" #include "chrome/common/thumbnail_score.h" #include "net/base/net_util.h" @@ -670,7 +671,7 @@ void RenderViewHost::OnMessageReceived(const IPC::Message& msg) { IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTitle, OnMsgUpdateTitle) IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateEncoding, OnMsgUpdateEncoding) IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnMsgUpdateTargetURL) - IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_Thumbnail, OnMsgThumbnail(msg)) + IPC_MESSAGE_HANDLER(ViewHostMsg_Thumbnail, OnMsgThumbnail) IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnMsgClose) IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnMsgRequestMove) IPC_MESSAGE_HANDLER(ViewHostMsg_DidStartLoading, OnMsgDidStartLoading) @@ -891,22 +892,9 @@ void RenderViewHost::OnMsgUpdateTargetURL(int32 page_id, Send(new ViewMsg_UpdateTargetURL_ACK(routing_id())); } -void RenderViewHost::OnMsgThumbnail(const IPC::Message& msg) { - // crack the message - void* iter = NULL; - GURL url; - if (!IPC::ParamTraits<GURL>::Read(&msg, &iter, &url)) - return; - - ThumbnailScore score; - if (!IPC::ParamTraits<ThumbnailScore>::Read(&msg, &iter, &score)) - return; - - // thumbnail data - SkBitmap bitmap; - if (!IPC::ParamTraits<SkBitmap>::Read(&msg, &iter, &bitmap)) - return; - +void RenderViewHost::OnMsgThumbnail(const GURL& url, + const ThumbnailScore& score, + const SkBitmap& bitmap) { delegate_->UpdateThumbnail(url, bitmap, score); } diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h index 0cd052e..fb8df10 100644 --- a/chrome/browser/renderer_host/render_view_host.h +++ b/chrome/browser/renderer_host/render_view_host.h @@ -437,7 +437,9 @@ class RenderViewHost : public RenderWidgetHost { void OnMsgUpdateTitle(int32 page_id, const std::wstring& title); void OnMsgUpdateEncoding(const std::wstring& encoding); void OnMsgUpdateTargetURL(int32 page_id, const GURL& url); - void OnMsgThumbnail(const IPC::Message& msg); + void OnMsgThumbnail(const GURL& url, + const ThumbnailScore& score, + const SkBitmap& bitmap); void OnMsgClose(); void OnMsgRequestMove(const gfx::Rect& pos); void OnMsgDidRedirectProvisionalLoad(int32 page_id, diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h index 27662d7..77e161d 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.h +++ b/chrome/browser/renderer_host/render_view_host_delegate.h @@ -9,9 +9,12 @@ #include <vector> #include "base/basictypes.h" -#include "chrome/common/render_messages.h" +#include "base/file_path.h" +#include "base/logging.h" #include "net/base/load_states.h" +#include "webkit/glue/password_form.h" #include "webkit/glue/webpreferences.h" +#include "webkit/glue/window_open_disposition.h" class AutofillForm; class NavigationEntry; @@ -20,8 +23,12 @@ class RenderProcessHost; class RenderViewHost; class SkBitmap; class WebContents; +class WebKeyboardEvent; +struct ThumbnailScore; +struct ViewHostMsg_ContextMenu_Params; +struct ViewHostMsg_DidPrintPage_Params; +struct ViewHostMsg_FrameNavigate_Params; struct WebDropData; -enum WindowOpenDisposition; namespace base { class WaitableEvent; @@ -35,6 +42,10 @@ namespace gfx { class Rect; } +namespace webkit_glue { +struct WebApplicationInfo; +} + // // RenderViewHostDelegate // diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc index 50a6ef3..a6d289b 100644 --- a/chrome/browser/renderer_host/render_widget_host.cc +++ b/chrome/browser/renderer_host/render_widget_host.cc @@ -11,6 +11,7 @@ #include "chrome/browser/renderer_host/render_widget_helper.h" #include "chrome/browser/renderer_host/render_widget_host_view.h" #include "chrome/common/notification_service.h" +#include "chrome/common/render_messages.h" #include "chrome/views/view.h" #include "webkit/glue/webcursor.h" #include "webkit/glue/webinputevent.h" @@ -549,7 +550,7 @@ void RenderWidgetHost::OnMsgSetCursor(const WebCursor& cursor) { view_->UpdateCursor(cursor); } -void RenderWidgetHost::OnMsgImeUpdateStatus(ViewHostMsg_ImeControl control, +void RenderWidgetHost::OnMsgImeUpdateStatus(int control, const gfx::Rect& caret_rect) { if (view_) { view_->IMEUpdateStatus(control, caret_rect); diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h index 08f20f0..06b9fb0 100644 --- a/chrome/browser/renderer_host/render_widget_host.h +++ b/chrome/browser/renderer_host/render_widget_host.h @@ -11,7 +11,6 @@ #include "base/timer.h" #include "chrome/common/bitmap_wire_data.h" #include "chrome/common/ipc_channel.h" -#include "chrome/common/render_messages.h" #include "testing/gtest/include/gtest/gtest_prod.h" namespace gfx { @@ -255,8 +254,9 @@ class RenderWidgetHost : public IPC::Channel::Listener { void OnMsgFocus(); void OnMsgBlur(); void OnMsgSetCursor(const WebCursor& cursor); - void OnMsgImeUpdateStatus(ViewHostMsg_ImeControl control, - const gfx::Rect& caret_rect); + // Using int instead of ViewHostMsg_ImeControl for control's type to avoid + // having to bring in render_messages.h in a header file. + void OnMsgImeUpdateStatus(int control, const gfx::Rect& caret_rect); // Paints the given bitmap to the current backing store at the given location. void PaintBackingStoreRect(BitmapWireData bitmap, diff --git a/chrome/browser/renderer_host/render_widget_host_view.h b/chrome/browser/renderer_host/render_widget_host_view.h index 76316b4..b451fd3 100644 --- a/chrome/browser/renderer_host/render_widget_host_view.h +++ b/chrome/browser/renderer_host/render_widget_host_view.h @@ -7,7 +7,7 @@ #include "base/gfx/native_widget_types.h" #include "base/shared_memory.h" -#include "chrome/common/render_messages.h" +#include "webkit/glue/webplugin.h" namespace gfx { class Rect; @@ -85,8 +85,7 @@ class RenderWidgetHostView { virtual void SetIsLoading(bool is_loading) = 0; // Enable or disable IME for the view. - virtual void IMEUpdateStatus(ViewHostMsg_ImeControl control, - const gfx::Rect& caret_rect) = 0; + virtual void IMEUpdateStatus(int control, const gfx::Rect& caret_rect) = 0; // Informs the view that a portion of the widget's backing store was painted. // The view should copy the given rect from the backing store of the render diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc index f4c27dd..d6fad5e 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_win.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc @@ -271,7 +271,7 @@ void RenderWidgetHostViewWin::SetIsLoading(bool is_loading) { UpdateCursorIfOverSelf(); } -void RenderWidgetHostViewWin::IMEUpdateStatus(ViewHostMsg_ImeControl control, +void RenderWidgetHostViewWin::IMEUpdateStatus(int control, const gfx::Rect& caret_rect) { if (control == IME_DISABLE) { ime_input_.DisableIME(m_hWnd); diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.h b/chrome/browser/renderer_host/render_widget_host_view_win.h index 0c8e6c3..c4d08d3 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_win.h +++ b/chrome/browser/renderer_host/render_widget_host_view_win.h @@ -136,8 +136,7 @@ class RenderWidgetHostViewWin : virtual void UpdateCursor(const WebCursor& cursor); virtual void UpdateCursorIfOverSelf(); virtual void SetIsLoading(bool is_loading); - virtual void IMEUpdateStatus(ViewHostMsg_ImeControl control, - const gfx::Rect& caret_rect); + virtual void IMEUpdateStatus(int control, const gfx::Rect& caret_rect); virtual void DidPaintRect(const gfx::Rect& rect); virtual void DidScrollRect(const gfx::Rect& rect, int dx, int dy); virtual void RendererGone(); diff --git a/chrome/browser/renderer_host/test_render_view_host.h b/chrome/browser/renderer_host/test_render_view_host.h index 8618ea9..b74a56f 100644 --- a/chrome/browser/renderer_host/test_render_view_host.h +++ b/chrome/browser/renderer_host/test_render_view_host.h @@ -54,8 +54,7 @@ class TestRenderWidgetHostView : public RenderWidgetHostView { virtual void SetIsLoading(bool is_loading) {} virtual void UpdateCursor(const WebCursor& cursor) {} virtual void UpdateCursorIfOverSelf() {} - virtual void IMEUpdateStatus(ViewHostMsg_ImeControl control, - const gfx::Rect& caret_rect) {} + virtual void IMEUpdateStatus(int control, const gfx::Rect& caret_rect) {} virtual void DidPaintRect(const gfx::Rect& rect) {} virtual void DidScrollRect(const gfx::Rect& rect, int dx, int dy) {} virtual void RendererGone() {} diff --git a/chrome/browser/resource_message_filter.h b/chrome/browser/resource_message_filter.h index 43034b6..af9d604 100644 --- a/chrome/browser/resource_message_filter.h +++ b/chrome/browser/resource_message_filter.h @@ -28,6 +28,7 @@ class ClipboardService; class Profile; class RenderWidgetHelper; class SpellChecker; +struct ViewHostMsg_Resource_Request; struct WebPluginInfo; namespace printing { diff --git a/chrome/browser/ssl/ssl_uitest.cc b/chrome/browser/ssl/ssl_uitest.cc index 1819010..f31d8f2 100644 --- a/chrome/browser/ssl/ssl_uitest.cc +++ b/chrome/browser/ssl/ssl_uitest.cc @@ -7,6 +7,7 @@ #include <string> +#include "chrome/common/filter_policy.h" #include "chrome/common/pref_names.h" #include "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/tab_proxy.h" diff --git a/chrome/browser/tab_contents/interstitial_page.h b/chrome/browser/tab_contents/interstitial_page.h index d51d099..2fee13b 100644 --- a/chrome/browser/tab_contents/interstitial_page.h +++ b/chrome/browser/tab_contents/interstitial_page.h @@ -7,6 +7,7 @@ #include <string> +#include "base/gfx/size.h" #include "chrome/browser/renderer_host/render_view_host_delegate.h" #include "chrome/common/notification_registrar.h" #include "googleurl/src/gurl.h" diff --git a/chrome/browser/tab_contents/web_contents.cc b/chrome/browser/tab_contents/web_contents.cc index eadb3d6..17c9013 100644 --- a/chrome/browser/tab_contents/web_contents.cc +++ b/chrome/browser/tab_contents/web_contents.cc @@ -27,6 +27,7 @@ #include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" +#include "chrome/common/render_messages.h" #include "net/base/mime_util.h" #include "net/base/net_errors.h" #include "net/base/registry_controlled_domain.h" |