diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/tab_contents/render_view_context_menu.cc | 16 | ||||
-rw-r--r-- | chrome/browser/ui/browser.cc | 5 | ||||
-rw-r--r-- | chrome/browser/ui/find_bar/find_tab_helper.cc | 13 | ||||
-rw-r--r-- | chrome/browser/ui/gtk/browser_window_gtk.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/views/frame/browser_view.cc | 4 |
5 files changed, 12 insertions, 30 deletions
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index 06f3155..31bb05b 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -62,9 +62,9 @@ #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/user_metrics.h" #include "content/common/content_restriction.h" -#include "content/common/view_messages.h" #include "grit/generated_resources.h" #include "net/base/escape.h" +#include "net/base/net_util.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.h" #include "ui/base/l10n/l10n_util.h" @@ -1427,8 +1427,7 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) { if (id >= IDC_CONTENT_CONTEXT_CUSTOM_FIRST && id <= IDC_CONTENT_CONTEXT_CUSTOM_LAST) { unsigned action = id - IDC_CONTENT_CONTEXT_CUSTOM_FIRST; - rvh->Send(new ViewMsg_CustomContextMenuAction( - rvh->routing_id(), params_.custom_context, action)); + rvh->ExecuteCustomContextMenuCommand(action, params_.custom_context); return; } @@ -1873,8 +1872,7 @@ void RenderViewContextMenu::MenuClosed(ui::SimpleMenuModel* source) { view->ShowingContextMenu(false); RenderViewHost* rvh = source_tab_contents_->render_view_host(); if (rvh) { - rvh->Send(new ViewMsg_ContextMenuClosed( - rvh->routing_id(), params_.custom_context)); + rvh->NotifyContextMenuClosed(params_.custom_context); } } @@ -1923,8 +1921,7 @@ void RenderViewContextMenu::OpenURL( } void RenderViewContextMenu::CopyImageAt(int x, int y) { - RenderViewHost* rvh = source_tab_contents_->render_view_host(); - rvh->Send(new ViewMsg_CopyImageAt(rvh->routing_id(), x, y)); + source_tab_contents_->render_view_host()->CopyImageAt(x, y); } void RenderViewContextMenu::Inspect(int x, int y) { @@ -1943,7 +1940,6 @@ void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) { void RenderViewContextMenu::MediaPlayerActionAt( const gfx::Point& location, const WebMediaPlayerAction& action) { - RenderViewHost* rvh = source_tab_contents_->render_view_host(); - rvh->Send(new ViewMsg_MediaPlayerActionAt( - rvh->routing_id(), location, action)); + source_tab_contents_->render_view_host()-> + ExecuteMediaPlayerActionAtLocation(location, action); } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 639ba74..321fce1 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -18,6 +18,7 @@ #include "base/metrics/histogram.h" #include "base/path_service.h" #include "base/string_number_conversions.h" +#include "base/stringprintf.h" #include "base/string_util.h" #include "base/threading/thread.h" #include "base/threading/thread_restrictions.h" @@ -143,7 +144,6 @@ #include "content/common/notification_service.h" #include "content/common/page_transition_types.h" #include "content/common/page_zoom.h" -#include "content/common/view_messages.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" @@ -3389,8 +3389,7 @@ void Browser::AddNewContents(TabContents* source, return; } - RenderViewHost* view = new_contents->render_view_host(); - view->Send(new ViewMsg_DisassociateFromPopupCount(view->routing_id())); + new_contents->render_view_host()->DisassociateFromPopupCount(); } browser::NavigateParams params(this, new_wrapper); diff --git a/chrome/browser/ui/find_bar/find_tab_helper.cc b/chrome/browser/ui/find_bar/find_tab_helper.cc index c7f191c..d2eba07 100644 --- a/chrome/browser/ui/find_bar/find_tab_helper.cc +++ b/chrome/browser/ui/find_bar/find_tab_helper.cc @@ -12,7 +12,7 @@ #include "content/browser/tab_contents/tab_contents.h" #include "chrome/common/chrome_notification_types.h" #include "content/common/notification_service.h" -#include "content/common/view_messages.h" +#include "content/common/view_message_enums.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" using WebKit::WebFindOptions; @@ -119,8 +119,7 @@ void FindTabHelper::StopFinding( NOTREACHED(); params.action = ViewMsg_StopFinding_Params::kKeepSelection; } - tab_contents()->render_view_host()->Send(new ViewMsg_StopFinding( - tab_contents()->render_view_host()->routing_id(), params)); + tab_contents()->render_view_host()->StopFinding(params); } void FindTabHelper::HandleFindReply(int request_id, @@ -152,12 +151,4 @@ void FindTabHelper::HandleFindReply(int request_id, Source<TabContents>(tab_contents()), Details<FindNotificationDetails>(&last_search_result_)); } - - // Send a notification to the renderer that we are ready to receive more - // results from the scoping effort of the Find operation. The FindInPage - // scoping is asynchronous and periodically sends results back up to the - // browser using IPC. In an effort to not spam the browser we have the - // browser send an ACK for each FindReply message and have the renderer - // queue up the latest status message while waiting for this ACK. - Send(new ViewMsg_FindReplyACK(routing_id())); } diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc index 7ab1b0b..3a676ff 100644 --- a/chrome/browser/ui/gtk/browser_window_gtk.cc +++ b/chrome/browser/ui/gtk/browser_window_gtk.cc @@ -84,7 +84,6 @@ #include "content/browser/tab_contents/tab_contents_view.h" #include "content/common/native_web_keyboard_event.h" #include "content/common/notification_service.h" -#include "content/common/view_messages.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" @@ -1395,8 +1394,7 @@ gboolean BrowserWindowGtk::OnConfigure(GtkWidget* widget, TabContentsWrapper* tab = GetDisplayedTab(); if (tab) { - RenderViewHost* rvh = tab->tab_contents()->render_view_host(); - rvh->Send(new ViewMsg_MoveOrResizeStarted(rvh->routing_id())); + tab->tab_contents()->render_view_host()->NotifyMoveOrResizeStarted(); } if (bounds_.size() != bounds.size()) diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index c952ef1..511422d 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc @@ -83,7 +83,6 @@ #include "content/browser/user_metrics.h" #include "content/common/content_switches.h" #include "content/common/notification_service.h" -#include "content/common/view_messages.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" @@ -1730,8 +1729,7 @@ void BrowserView::OnWindowBeginUserBoundsChange() { TabContents* tab_contents = GetSelectedTabContents(); if (!tab_contents) return; - RenderViewHost* rvh = tab_contents->render_view_host(); - rvh->Send(new ViewMsg_MoveOrResizeStarted(rvh->routing_id())); + tab_contents->render_view_host()->NotifyMoveOrResizeStarted(); } void BrowserView::OnWidgetMove() { |