diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-19 22:59:57 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-19 22:59:57 +0000 |
commit | 6a64e8a2affa73435a7f90dcddb4cad873c1884e (patch) | |
tree | 86c7d3b6d4c17aea67b8ccb8d6cb39c8a21111d9 /chrome/browser/ui | |
parent | c8b0eb2495c63de99a2fa1dc81e9c2edb1700e87 (diff) | |
download | chromium_src-6a64e8a2affa73435a7f90dcddb4cad873c1884e.zip chromium_src-6a64e8a2affa73435a7f90dcddb4cad873c1884e.tar.gz chromium_src-6a64e8a2affa73435a7f90dcddb4cad873c1884e.tar.bz2 |
Removed the sending of the following content IPC messages out of chrome and replaced them with
corresponding API's on the RenderWidgetHost object.
1. ViewMsg_Zoom.
2. ViewMsg_ReloadFrame.
3. ViewMsg_Find.
4. ViewMsg_CSSInsertRequest.
5. ViewMsg_DisableScrollbarsForSmallWindows.
6. ViewMsg_EnablePreferredSizeChangedMode.
Continuing fixes to ensure that IPC messages don't span across content and chrome.
BUG=87335.
TEST=no change in functionality.
Review URL: http://codereview.chromium.org/7923023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r-- | chrome/browser/ui/browser.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/cocoa/applescript/tab_applescript.mm | 2 | ||||
-rw-r--r-- | chrome/browser/ui/find_bar/find_tab_helper.cc | 5 | ||||
-rw-r--r-- | chrome/browser/ui/panels/panel.cc | 10 |
4 files changed, 8 insertions, 11 deletions
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index ac6cfde..a40639c 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1878,7 +1878,7 @@ void Browser::Zoom(PageZoom::Function zoom_function) { UserMetrics::RecordAction(kActions[zoom_function - PageZoom::ZOOM_OUT]); TabContentsWrapper* tab_contents = GetSelectedTabContentsWrapper(); RenderViewHost* host = tab_contents->render_view_host(); - host->Send(new ViewMsg_Zoom(host->routing_id(), zoom_function)); + host->Zoom(zoom_function); } void Browser::FocusToolbar() { diff --git a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm index 1b8f0b8..a0f4726 100644 --- a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm +++ b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm @@ -227,7 +227,7 @@ return; } - view->Send(new ViewMsg_Stop(view->routing_id())); + view->Stop(); } - (void)handlesPrintScriptCommand:(NSScriptCommand*)command { diff --git a/chrome/browser/ui/find_bar/find_tab_helper.cc b/chrome/browser/ui/find_bar/find_tab_helper.cc index 9c5e538..c7f191c 100644 --- a/chrome/browser/ui/find_bar/find_tab_helper.cc +++ b/chrome/browser/ui/find_bar/find_tab_helper.cc @@ -84,9 +84,8 @@ void FindTabHelper::StartFinding(string16 search_string, options.forward = forward_direction; options.matchCase = case_sensitive; options.findNext = find_next; - tab_contents()->render_view_host()->Send(new ViewMsg_Find( - tab_contents()->render_view_host()->routing_id(), - current_find_request_id_, find_text_, options)); + tab_contents()->render_view_host()->Find(current_find_request_id_, + find_text_, options); } void FindTabHelper::StopFinding( diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc index 2fcd393..d9492b7 100644 --- a/chrome/browser/ui/panels/panel.cc +++ b/chrome/browser/ui/panels/panel.cc @@ -508,9 +508,8 @@ void Panel::Observe(int type, case content::NOTIFICATION_TAB_CONTENTS_SWAPPED: { RenderViewHost* render_view_host = GetRenderViewHost(); DCHECK(render_view_host); - render_view_host->Send(new ViewMsg_EnablePreferredSizeChangedMode( - render_view_host->routing_id(), - kPreferredSizeWidth | kPreferredSizeHeightThisIsSlow)); + render_view_host->EnablePreferredSizeMode( + kPreferredSizeWidth | kPreferredSizeHeightThisIsSlow); RequestRenderViewHostToDisableScrollbars(render_view_host); break; } @@ -532,10 +531,9 @@ void Panel::RequestRenderViewHostToDisableScrollbars( DCHECK(render_view_host); gfx::Size non_client_size = native_panel_->GetNonClientAreaExtent(); - render_view_host->Send(new ViewMsg_DisableScrollbarsForSmallWindows( - render_view_host->routing_id(), + render_view_host->DisableScrollbarsForThreshold( gfx::Size(max_size_.width() - non_client_size.width(), - max_size_.height() - non_client_size.height()))); + max_size_.height() - non_client_size.height())); } Browser* Panel::browser() const { |