summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r--chrome/browser/ui/alternate_error_tab_observer.cc4
-rw-r--r--chrome/browser/ui/browser.cc30
-rw-r--r--chrome/browser/ui/browser_browsertest.cc31
-rw-r--r--chrome/browser/ui/browser_list_unittest.cc2
-rw-r--r--chrome/browser/ui/cocoa/applescript/tab_applescript.mm16
-rw-r--r--chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/hung_renderer_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/tabpose_window.mm8
-rw-r--r--chrome/browser/ui/constrained_window_tab_helper.cc2
-rw-r--r--chrome/browser/ui/content_settings/content_setting_bubble_model.cc2
-rw-r--r--chrome/browser/ui/find_bar/find_bar_host_browsertest.cc6
-rw-r--r--chrome/browser/ui/find_bar/find_tab_helper.cc6
-rw-r--r--chrome/browser/ui/fullscreen_controller.cc4
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/find_bar_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/gtk_util.cc2
-rw-r--r--chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc2
-rw-r--r--chrome/browser/ui/login/login_prompt_win.cc2
-rw-r--r--chrome/browser/ui/panels/panel.cc2
-rw-r--r--chrome/browser/ui/panels/panel_browsertest.cc8
-rw-r--r--chrome/browser/ui/pdf/pdf_browsertest.cc10
-rw-r--r--chrome/browser/ui/pdf/pdf_unsupported_feature.cc10
-rw-r--r--chrome/browser/ui/prefs/prefs_tab_helper.cc4
-rw-r--r--chrome/browser/ui/views/aura/app_list_window.cc2
-rw-r--r--chrome/browser/ui/views/find_bar_host.cc2
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc2
-rw-r--r--chrome/browser/ui/views/hung_renderer_view.cc2
-rw-r--r--chrome/browser/ui/views/notifications/balloon_view_host.cc2
-rw-r--r--chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc14
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc6
-rw-r--r--chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc2
-rw-r--r--chrome/browser/ui/webui/cloud_print_signin_dialog.cc2
-rw-r--r--chrome/browser/ui/webui/hung_renderer_dialog.cc4
-rw-r--r--chrome/browser/ui/webui/media/media_internals_handler.cc2
-rw-r--r--chrome/browser/ui/webui/net_internals_ui_browsertest.cc2
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc2
-rw-r--r--chrome/browser/ui/webui/options/extension_settings_handler.cc4
-rw-r--r--chrome/browser/ui/webui/print_preview_handler.cc6
-rw-r--r--chrome/browser/ui/webui/task_manager_handler.cc4
-rw-r--r--chrome/browser/ui/webui/tracing_ui.cc4
-rw-r--r--chrome/browser/ui/webui/web_ui_test_handler.cc4
-rw-r--r--chrome/browser/ui/webui/web_ui_unittest.cc4
-rw-r--r--chrome/browser/ui/webui/workers_ui_browsertest.cc2
46 files changed, 119 insertions, 122 deletions
diff --git a/chrome/browser/ui/alternate_error_tab_observer.cc b/chrome/browser/ui/alternate_error_tab_observer.cc
index c148416..dbd8603 100644
--- a/chrome/browser/ui/alternate_error_tab_observer.cc
+++ b/chrome/browser/ui/alternate_error_tab_observer.cc
@@ -54,14 +54,14 @@ void AlternateErrorPageTabObserver::Observe(int type,
const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_GOOGLE_URL_UPDATED:
- UpdateAlternateErrorPageURL(tab_contents()->render_view_host());
+ UpdateAlternateErrorPageURL(tab_contents()->GetRenderViewHost());
break;
case chrome::NOTIFICATION_PREF_CHANGED: {
std::string* pref_name = content::Details<std::string>(details).ptr();
DCHECK(content::Source<PrefService>(source).ptr() ==
wrapper_->profile()->GetPrefs());
if (*pref_name == prefs::kAlternateErrorPagesEnabled) {
- UpdateAlternateErrorPageURL(tab_contents()->render_view_host());
+ UpdateAlternateErrorPageURL(tab_contents()->GetRenderViewHost());
} else {
NOTREACHED() << "unexpected pref change notification" << *pref_name;
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 3b54f7d..94a725a 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -702,7 +702,7 @@ TabContents* Browser::OpenApplicationWindow(
browser->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_START_PAGE);
TabContents* contents = wrapper->tab_contents();
contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
- contents->render_view_host()->SyncRendererPrefs();
+ contents->GetRenderViewHost()->SyncRendererPrefs();
browser->window()->Show();
// TODO(jcampan): http://crbug.com/8123 we should not need to set the initial
@@ -1944,7 +1944,7 @@ void Browser::Zoom(content::PageZoom zoom) {
return;
RenderViewHost* host =
- GetSelectedTabContentsWrapper()->tab_contents()->render_view_host();
+ GetSelectedTabContentsWrapper()->tab_contents()->GetRenderViewHost();
if (zoom == content::PAGE_ZOOM_RESET) {
host->SetZoomLevel(0);
content::RecordAction(UserMetricsAction("ZoomNormal"));
@@ -2082,7 +2082,7 @@ void Browser::ToggleDevToolsWindow(DevToolsToggleAction action) {
content::RecordAction(UserMetricsAction("DevTools_ToggleWindow"));
DevToolsWindow::ToggleDevToolsWindow(
- GetSelectedTabContentsWrapper()->tab_contents()->render_view_host(),
+ GetSelectedTabContentsWrapper()->tab_contents()->GetRenderViewHost(),
action);
}
@@ -2501,7 +2501,7 @@ bool Browser::RunUnloadEventsHelper(TabContents* contents) {
// them. Once they have fired, we'll get a message back saying whether
// to proceed closing the page or not, which sends us back to this method
// with the NeedToFireBeforeUnload bit cleared.
- contents->render_view_host()->FirePageBeforeUnload(false);
+ contents->GetRenderViewHost()->FirePageBeforeUnload(false);
return true;
}
return false;
@@ -2534,7 +2534,7 @@ void Browser::RunFileChooserHelper(
// goes out of scope.
scoped_refptr<FileSelectHelper> file_select_helper(
new FileSelectHelper(profile));
- file_select_helper->RunFileChooser(tab->render_view_host(), tab, params);
+ file_select_helper->RunFileChooser(tab->GetRenderViewHost(), tab, params);
}
// static
@@ -2542,10 +2542,8 @@ void Browser::EnumerateDirectoryHelper(TabContents* tab, int request_id,
const FilePath& path) {
ChildProcessSecurityPolicy* policy =
ChildProcessSecurityPolicy::GetInstance();
- if (!policy->CanReadDirectory(tab->render_view_host()->process()->GetID(),
- path)) {
+ if (!policy->CanReadDirectory(tab->GetRenderProcessHost()->GetID(), path))
return;
- }
Profile* profile =
Profile::FromBrowserContext(tab->browser_context());
@@ -2555,7 +2553,7 @@ void Browser::EnumerateDirectoryHelper(TabContents* tab, int request_id,
scoped_refptr<FileSelectHelper> file_select_helper(
new FileSelectHelper(profile));
file_select_helper->EnumerateDirectory(request_id,
- tab->render_view_host(),
+ tab->GetRenderViewHost(),
path);
}
@@ -3497,7 +3495,7 @@ void Browser::AddNewContents(TabContents* source,
return;
}
- new_contents->render_view_host()->DisassociateFromPopupCount();
+ new_contents->GetRenderViewHost()->DisassociateFromPopupCount();
}
browser::NavigateParams params(this, new_wrapper);
@@ -3655,7 +3653,7 @@ void Browser::ConvertContentsToApplication(TabContents* contents) {
app_browser->tabstrip_model()->AppendTabContents(wrapper, true);
contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
- contents->render_view_host()->SyncRendererPrefs();
+ contents->GetRenderViewHost()->SyncRendererPrefs();
app_browser->window()->Show();
}
@@ -4909,8 +4907,8 @@ void Browser::ProcessPendingTabs() {
TabContents* tab = *(tabs_needing_before_unload_fired_.begin());
// Null check render_view_host here as this gets called on a PostTask and
// the tab's render_view_host may have been nulled out.
- if (tab->render_view_host()) {
- tab->render_view_host()->FirePageBeforeUnload(false);
+ if (tab->GetRenderViewHost()) {
+ tab->GetRenderViewHost()->FirePageBeforeUnload(false);
} else {
ClearUnloadState(tab, true);
}
@@ -4926,8 +4924,8 @@ void Browser::ProcessPendingTabs() {
TabContents* tab = *(tabs_needing_unload_fired_.begin());
// Null check render_view_host here as this gets called on a PostTask and
// the tab's render_view_host may have been nulled out.
- if (tab->render_view_host()) {
- tab->render_view_host()->ClosePage();
+ if (tab->GetRenderViewHost()) {
+ tab->GetRenderViewHost()->ClosePage();
} else {
ClearUnloadState(tab, true);
}
@@ -5317,7 +5315,7 @@ void Browser::ShowSyncSetup() {
}
void Browser::ToggleSpeechInput() {
- GetSelectedTabContentsWrapper()->tab_contents()->render_view_host()->
+ GetSelectedTabContentsWrapper()->tab_contents()->GetRenderViewHost()->
ToggleSpeechInput();
}
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index d35cecb..c34d6b2 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -212,7 +212,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, JavascriptAlertActivatesTab) {
EXPECT_EQ(0, browser()->active_index());
TabContents* second_tab = browser()->GetTabContentsAt(1);
ASSERT_TRUE(second_tab);
- second_tab->render_view_host()->ExecuteJavascriptInWebFrame(
+ second_tab->GetRenderViewHost()->ExecuteJavascriptInWebFrame(
string16(),
ASCIIToUTF16("alert('Activate!');"));
AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog();
@@ -269,7 +269,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, ReloadThenCancelBeforeUnload) {
EXPECT_FALSE(browser()->GetSelectedTabContents()->IsLoading());
// Clear the beforeunload handler so the test can easily exit.
- browser()->GetSelectedTabContents()->render_view_host()->
+ browser()->GetSelectedTabContents()->GetRenderViewHost()->
ExecuteJavascriptInWebFrame(string16(),
ASCIIToUTF16("onbeforeunload=null;"));
}
@@ -301,7 +301,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CancelBeforeUnloadResetsURL) {
EXPECT_EQ(url.spec(), UTF16ToUTF8(browser()->toolbar_model()->GetText()));
// Clear the beforeunload handler so the test can easily exit.
- browser()->GetSelectedTabContents()->render_view_host()->
+ browser()->GetSelectedTabContents()->GetRenderViewHost()->
ExecuteJavascriptInWebFrame(string16(),
ASCIIToUTF16("onbeforeunload=null;"));
}
@@ -318,14 +318,14 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CancelBeforeUnloadResetsURL) {
// Test for crbug.com/11647. A page closed with window.close() should not have
// two beforeunload dialogs shown.
IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_SingleBeforeUnloadAfterWindowClose) {
- browser()->GetSelectedTabContents()->render_view_host()->
+ browser()->GetSelectedTabContents()->GetRenderViewHost()->
ExecuteJavascriptInWebFrame(string16(),
ASCIIToUTF16(kOpenNewBeforeUnloadPage));
// Close the new window with JavaScript, which should show a single
// beforeunload dialog. Then show another alert, to make it easy to verify
// that a second beforeunload dialog isn't shown.
- browser()->GetTabContentsAt(0)->render_view_host()->
+ browser()->GetTabContentsAt(0)->GetRenderViewHost()->
ExecuteJavascriptInWebFrame(string16(),
ASCIIToUTF16("w.close(); alert('bar');"));
AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog();
@@ -357,7 +357,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
// Start with an http URL.
ui_test_utils::NavigateToURL(browser(), http_url);
TabContents* oldtab = browser()->GetSelectedTabContents();
- content::RenderProcessHost* process = oldtab->render_view_host()->process();
+ content::RenderProcessHost* process = oldtab->GetRenderProcessHost();
// Now open a tab to a blank page, set its opener to null, and redirect it
// cross-site.
@@ -373,7 +373,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
ui_test_utils::WindowedNotificationObserver nav_observer(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::NotificationService::AllSources());
- oldtab->render_view_host()->
+ oldtab->GetRenderViewHost()->
ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(redirect_popup));
// Wait for popup window to appear and finish navigating.
@@ -389,7 +389,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
// Popup window should not be in the opener's process.
content::RenderProcessHost* popup_process =
- newtab->render_view_host()->process();
+ newtab->GetRenderProcessHost();
EXPECT_NE(process, popup_process);
// Now open a tab to a blank page, set its opener to null, and use a
@@ -407,7 +407,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
ui_test_utils::WindowedNotificationObserver nav_observer2(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::NotificationService::AllSources());
- oldtab->render_view_host()->
+ oldtab->GetRenderViewHost()->
ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(refresh_popup));
// Wait for popup window to appear and finish navigating.
@@ -423,7 +423,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
// This popup window should also not be in the opener's process.
content::RenderProcessHost* popup_process2 =
- newtab2->render_view_host()->process();
+ newtab2->GetRenderProcessHost();
EXPECT_NE(process, popup_process2);
}
@@ -445,7 +445,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
// Start with an http URL.
ui_test_utils::NavigateToURL(browser(), http_url);
TabContents* oldtab = browser()->GetSelectedTabContents();
- content::RenderProcessHost* process = oldtab->render_view_host()->process();
+ content::RenderProcessHost* process = oldtab->GetRenderProcessHost();
// Now open a tab to a blank page, set its opener to null, and redirect it
// cross-site.
@@ -460,7 +460,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
ui_test_utils::WindowedNotificationObserver nav_observer(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::NotificationService::AllSources());
- oldtab->render_view_host()->
+ oldtab->GetRenderViewHost()->
ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(dont_fork_popup));
// Wait for popup window to appear and finish navigating.
@@ -476,7 +476,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
// Popup window should still be in the opener's process.
content::RenderProcessHost* popup_process =
- newtab->render_view_host()->process();
+ newtab->GetRenderProcessHost();
EXPECT_EQ(process, popup_process);
// Same thing if the current tab tries to navigate itself.
@@ -487,7 +487,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
ui_test_utils::WindowedNotificationObserver nav_observer2(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::NotificationService::AllSources());
- oldtab->render_view_host()->
+ oldtab->GetRenderViewHost()->
ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(navigate_str));
nav_observer2.Wait();
ASSERT_TRUE(oldtab->controller().GetLastCommittedEntry());
@@ -495,8 +495,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
oldtab->controller().GetLastCommittedEntry()->url().spec());
// Original window should still be in the original process.
- content::RenderProcessHost* new_process =
- newtab->render_view_host()->process();
+ content::RenderProcessHost* new_process = newtab->GetRenderProcessHost();
EXPECT_EQ(process, new_process);
}
diff --git a/chrome/browser/ui/browser_list_unittest.cc b/chrome/browser/ui/browser_list_unittest.cc
index 0789bef..6ae4b08 100644
--- a/chrome/browser/ui/browser_list_unittest.cc
+++ b/chrome/browser/ui/browser_list_unittest.cc
@@ -32,7 +32,7 @@ size_t CountAllTabs() {
// Helper function to navigate to the print preview page.
void NavigateToPrintUrl(TabContentsWrapper* tab, int page_id) {
static_cast<TestRenderViewHost*>(
- tab->tab_contents()->render_view_host())->SendNavigate(
+ tab->tab_contents()->GetRenderViewHost())->SendNavigate(
page_id, GURL(chrome::kChromeUIPrintURL));
}
diff --git a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
index ef8aa25..13c4f5d 100644
--- a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
@@ -244,7 +244,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesUndoScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->GetRenderViewHost();
if (!view) {
NOTREACHED();
return;
@@ -254,7 +254,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesRedoScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->GetRenderViewHost();
if (!view) {
NOTREACHED();
return;
@@ -264,7 +264,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesCutScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->GetRenderViewHost();
if (!view) {
NOTREACHED();
return;
@@ -274,7 +274,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesCopyScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->GetRenderViewHost();
if (!view) {
NOTREACHED();
return;
@@ -284,7 +284,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesPasteScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->GetRenderViewHost();
if (!view) {
NOTREACHED();
return;
@@ -294,7 +294,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesSelectAllScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->GetRenderViewHost();
if (!view) {
NOTREACHED();
return;
@@ -325,7 +325,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesStopScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->GetRenderViewHost();
if (!view) {
// We tolerate Stop being called even before a view has been created.
// So just log a warning instead of a NOTREACHED().
@@ -400,7 +400,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (id)handlesExecuteJavascriptScriptCommand:(NSScriptCommand*)command {
- RenderViewHost* view = tabContents_->tab_contents()->render_view_host();
+ RenderViewHost* view = tabContents_->tab_contents()->GetRenderViewHost();
if (!view) {
NOTREACHED();
return nil;
diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
index 235a221..5052b8b 100644
--- a/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
+++ b/chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm
@@ -234,7 +234,7 @@ const float kRightEdgeOffset = 25;
// cmd-up/down if we ever decide to include |moveToBeginningOfDocument:| in
// the list above.
RenderViewHost* render_view_host =
- contents->tab_contents()->render_view_host();
+ contents->tab_contents()->GetRenderViewHost();
render_view_host->ForwardKeyboardEvent(NativeWebKeyboardEvent(event));
return YES;
}
diff --git a/chrome/browser/ui/cocoa/hung_renderer_controller.mm b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
index 41e616b..5a2147e 100644
--- a/chrome/browser/ui/cocoa/hung_renderer_controller.mm
+++ b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
@@ -116,8 +116,8 @@ class TabContentsObserverBridge : public TabContentsObserver {
}
- (IBAction)wait:(id)sender {
- if (hungContents_ && hungContents_->render_view_host())
- hungContents_->render_view_host()->RestartHangMonitorTimeout();
+ if (hungContents_ && hungContents_->GetRenderViewHost())
+ hungContents_->GetRenderViewHost()->RestartHangMonitorTimeout();
// Cannot call performClose:, because the close button is disabled.
[self close];
}
diff --git a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
index db10dc9..4b4aa77 100644
--- a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
@@ -186,7 +186,7 @@ void TabContentsNotificationBridge::ChangeTabContents(TabContents* contents) {
// The RWHV is ripped out of the view hierarchy on tab switches, so it never
// formally resigns first responder status. Handle this by explicitly sending
// a Blur() message to the renderer, but only if the RWHV currently has focus.
- RenderViewHost* rvh = [self tabContents]->render_view_host();
+ RenderViewHost* rvh = [self tabContents]->GetRenderViewHost();
if (rvh && rvh->view() && rvh->view()->HasFocus())
rvh->Blur();
}
diff --git a/chrome/browser/ui/cocoa/tabpose_window.mm b/chrome/browser/ui/cocoa/tabpose_window.mm
index 6b3bb82..c643cbb 100644
--- a/chrome/browser/ui/cocoa/tabpose_window.mm
+++ b/chrome/browser/ui/cocoa/tabpose_window.mm
@@ -254,13 +254,13 @@ void ThumbnailLoader::LoadThumbnail() {
TabContentsWrapper* devToolsContents =
DevToolsWindow::GetDevToolsContents(contents_->tab_contents());
if (devToolsContents && devToolsContents->tab_contents() &&
- devToolsContents->tab_contents()->render_view_host() &&
- devToolsContents->tab_contents()->render_view_host()->view()) {
+ devToolsContents->tab_contents()->GetRenderViewHost() &&
+ devToolsContents->tab_contents()->GetRenderViewHost()->view()) {
// The devtool's size might not be up-to-date, but since its height doesn't
// change on window resize, and since most users don't use devtools, this is
// good enough.
bottomOffset +=
- devToolsContents->tab_contents()->render_view_host()->view()->
+ devToolsContents->tab_contents()->GetRenderViewHost()->view()->
GetViewBounds().height();
bottomOffset += 1; // :-( Divider line between web contents and devtools.
}
@@ -285,7 +285,7 @@ void ThumbnailLoader::LoadThumbnail() {
}
- (void)drawInContext:(CGContextRef)context {
- RenderWidgetHost* rwh = contents_->tab_contents()->render_view_host();
+ RenderWidgetHost* rwh = contents_->tab_contents()->GetRenderViewHost();
// NULL if renderer crashed.
RenderWidgetHostView* rwhv = rwh ? rwh->view() : NULL;
if (!rwhv) {
diff --git a/chrome/browser/ui/constrained_window_tab_helper.cc b/chrome/browser/ui/constrained_window_tab_helper.cc
index 6b4fb99..6d37816 100644
--- a/chrome/browser/ui/constrained_window_tab_helper.cc
+++ b/chrome/browser/ui/constrained_window_tab_helper.cc
@@ -75,7 +75,7 @@ void ConstrainedWindowTabHelper::BlockTabContent(bool blocked) {
}
// RenderViewHost may be NULL during shutdown.
- RenderViewHost* host = contents->render_view_host();
+ RenderViewHost* host = contents->GetRenderViewHost();
if (host) {
host->set_ignore_input_events(blocked);
host->Send(
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index 8c38964..d60fc74 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -380,7 +380,7 @@ class ContentSettingPluginBubbleModel : public ContentSettingSingleRadioGroup {
virtual void OnCustomLinkClicked() OVERRIDE {
content::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble"));
DCHECK(tab_contents());
- RenderViewHost* host = tab_contents()->tab_contents()->render_view_host();
+ RenderViewHost* host = tab_contents()->tab_contents()->GetRenderViewHost();
host->Send(new ChromeViewMsg_LoadBlockedPlugins(host->routing_id()));
set_custom_link_enabled(false);
tab_contents()->content_settings()->set_load_plugins_link_enabled(false);
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
index 7763acd..acbcb2f 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -226,7 +226,7 @@ bool FocusedOnPage(TabContents* tab_contents, std::string* result)
bool FocusedOnPage(TabContents* tab_contents, std::string* result) {
return ui_test_utils::ExecuteJavaScriptAndExtractString(
- tab_contents->render_view_host(),
+ tab_contents->GetRenderViewHost(),
L"",
L"window.domAutomationController.send(getFocusedElement());",
result);
@@ -271,7 +271,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindInPageEndState) {
// Move the selection to link 1, after searching.
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
- tab_contents->tab_contents()->render_view_host(),
+ tab_contents->tab_contents()->GetRenderViewHost(),
L"",
L"window.domAutomationController.send(selectLink1());",
&result));
@@ -345,7 +345,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
// Move the selection to link 1, after searching.
std::string result;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
- tab->tab_contents()->render_view_host(),
+ tab->tab_contents()->GetRenderViewHost(),
L"",
L"window.domAutomationController.send(selectLink1());",
&result));
diff --git a/chrome/browser/ui/find_bar/find_tab_helper.cc b/chrome/browser/ui/find_bar/find_tab_helper.cc
index 1dfb494..974db90 100644
--- a/chrome/browser/ui/find_bar/find_tab_helper.cc
+++ b/chrome/browser/ui/find_bar/find_tab_helper.cc
@@ -84,8 +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()->Find(current_find_request_id_,
- find_text_, options);
+ tab_contents()->GetRenderViewHost()->Find(current_find_request_id_,
+ find_text_, options);
}
void FindTabHelper::StopFinding(
@@ -119,7 +119,7 @@ void FindTabHelper::StopFinding(
NOTREACHED();
action = content::STOP_FIND_ACTION_KEEP_SELECTION;
}
- tab_contents()->render_view_host()->StopFinding(action);
+ tab_contents()->GetRenderViewHost()->StopFinding(action);
}
void FindTabHelper::HandleFindReply(int request_id,
diff --git a/chrome/browser/ui/fullscreen_controller.cc b/chrome/browser/ui/fullscreen_controller.cc
index 1b52730..8f2ca4c 100644
--- a/chrome/browser/ui/fullscreen_controller.cc
+++ b/chrome/browser/ui/fullscreen_controller.cc
@@ -281,8 +281,8 @@ bool FullscreenController::HandleUserPressedEscape() {
void FullscreenController::NotifyTabOfFullscreenExitIfNecessary() {
if (fullscreened_tab_ &&
- fullscreened_tab_->tab_contents()->render_view_host()) {
- fullscreened_tab_->tab_contents()->render_view_host()->ExitFullscreen();
+ fullscreened_tab_->tab_contents()->GetRenderViewHost()) {
+ fullscreened_tab_->tab_contents()->GetRenderViewHost()->ExitFullscreen();
} else {
DCHECK_EQ(mouse_lock_state_, MOUSELOCK_NOT_REQUESTED);
}
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index 6d52c31..d9961b3 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -1414,7 +1414,7 @@ gboolean BrowserWindowGtk::OnConfigure(GtkWidget* widget,
TabContentsWrapper* tab = GetDisplayedTab();
if (tab) {
- tab->tab_contents()->render_view_host()->NotifyMoveOrResizeStarted();
+ tab->tab_contents()->GetRenderViewHost()->NotifyMoveOrResizeStarted();
}
if (bounds_.size() != bounds.size())
diff --git a/chrome/browser/ui/gtk/find_bar_gtk.cc b/chrome/browser/ui/gtk/find_bar_gtk.cc
index ccaa78d..5bb733b 100644
--- a/chrome/browser/ui/gtk/find_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/find_bar_gtk.cc
@@ -674,7 +674,7 @@ bool FindBarGtk::MaybeForwardKeyEventToRenderer(GdkEventKey* event) {
return false;
RenderViewHost* render_view_host =
- contents->tab_contents()->render_view_host();
+ contents->tab_contents()->GetRenderViewHost();
// Make sure we don't have a text field element interfering with keyboard
// input. Otherwise Up and Down arrow key strokes get eaten. "Nom Nom Nom".
diff --git a/chrome/browser/ui/gtk/gtk_util.cc b/chrome/browser/ui/gtk/gtk_util.cc
index 222fd3c..9c23ab8 100644
--- a/chrome/browser/ui/gtk/gtk_util.cc
+++ b/chrome/browser/ui/gtk/gtk_util.cc
@@ -1174,7 +1174,7 @@ void DoCutCopyPaste(BrowserWindow* window,
TabContents* current_tab = GetBrowserWindowSelectedTabContents(window);
if (current_tab && widget == current_tab->GetContentNativeView()) {
- (current_tab->render_view_host()->*method)();
+ (current_tab->GetRenderViewHost()->*method)();
} else {
guint id;
if ((id = g_signal_lookup(signal, G_OBJECT_TYPE(widget))) != 0)
diff --git a/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc b/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc
index 5172230..bf9342f 100644
--- a/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc
@@ -234,8 +234,8 @@ void HungRendererDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
case GTK_RESPONSE_OK:
case GTK_RESPONSE_DELETE_EVENT:
// Start waiting again for responsiveness.
- if (contents_ && contents_->render_view_host())
- contents_->render_view_host()->RestartHangMonitorTimeout();
+ if (contents_ && contents_->GetRenderViewHost())
+ contents_->GetRenderViewHost()->RestartHangMonitorTimeout();
break;
default:
NOTREACHED();
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc b/chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc
index af7f91c..2955305 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc
@@ -18,7 +18,7 @@ BalloonViewHost::~BalloonViewHost() {
}
void BalloonViewHost::UpdateActualSize(const gfx::Size& new_size) {
- RenderViewHost* host = tab_contents_->render_view_host();
+ RenderViewHost* host = tab_contents_->GetRenderViewHost();
if (host) {
RenderWidgetHostView* view = host->view();
if (view)
diff --git a/chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc b/chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc
index 634f6c0..7afd2148 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc
@@ -391,7 +391,7 @@ gboolean DraggedViewGtk::OnExpose(GtkWidget* widget, GdkEventExpose* event) {
// Draw the render area.
BackingStore* backing_store = drag_data_->GetSourceTabContents()->
- render_view_host()->GetBackingStore(false);
+ GetRenderViewHost()->GetBackingStore(false);
if (backing_store && !attached_) {
// This leaves room for the border.
static_cast<BackingStoreGtk*>(backing_store)->PaintToRect(
diff --git a/chrome/browser/ui/login/login_prompt_win.cc b/chrome/browser/ui/login/login_prompt_win.cc
index f1f241d..e87e8e9 100644
--- a/chrome/browser/ui/login/login_prompt_win.cc
+++ b/chrome/browser/ui/login/login_prompt_win.cc
@@ -60,7 +60,7 @@ class LoginHandlerWin : public LoginHandler,
TabContents* tab = GetTabContentsForLogin();
if (tab)
- tab->render_view_host()->set_ignore_input_events(false);
+ tab->GetRenderViewHost()->set_ignore_input_events(false);
// Reference is no longer valid.
SetDialog(NULL);
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 1e4d991..b9015ee 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -598,7 +598,7 @@ void Panel::ConfigureAutoResize(TabContents* tab_contents) {
return;
// NULL might be returned if the tab has not been added.
- RenderViewHost* render_view_host = tab_contents->render_view_host();
+ RenderViewHost* render_view_host = tab_contents->GetRenderViewHost();
if (!render_view_host)
return;
diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc
index cacd99fc..973c8aa 100644
--- a/chrome/browser/ui/panels/panel_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browsertest.cc
@@ -815,7 +815,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, FLAKY_AutoResize) {
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
content::Source<Panel>(panel));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScript(
- panel->browser()->GetSelectedTabContents()->render_view_host(),
+ panel->browser()->GetSelectedTabContents()->GetRenderViewHost(),
std::wstring(),
L"changeSize(50);"));
enlarge.Wait();
@@ -828,7 +828,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, FLAKY_AutoResize) {
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
content::Source<Panel>(panel));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScript(
- panel->browser()->GetSelectedTabContents()->render_view_host(),
+ panel->browser()->GetSelectedTabContents()->GetRenderViewHost(),
std::wstring(),
L"changeSize(-30);"));
shrink.Wait();
@@ -1477,7 +1477,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, CreateWithExistingContents) {
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
content::Source<Panel>(panel));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScript(
- panel_browser->GetSelectedTabContents()->render_view_host(),
+ panel_browser->GetSelectedTabContents()->GetRenderViewHost(),
std::wstring(),
L"changeSize(50);"));
enlarge.Wait();
@@ -1543,7 +1543,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, TightAutosizeAroundSingleLine) {
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
content::Source<Panel>(panel));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScript(
- panel->browser()->GetSelectedTabContents()->render_view_host(),
+ panel->browser()->GetSelectedTabContents()->GetRenderViewHost(),
std::wstring(),
L"document.body.innerHTML ="
L"'<nobr>line of text and a <button>Button</button>';"));
diff --git a/chrome/browser/ui/pdf/pdf_browsertest.cc b/chrome/browser/ui/pdf/pdf_browsertest.cc
index 96831b1..0061627 100644
--- a/chrome/browser/ui/pdf/pdf_browsertest.cc
+++ b/chrome/browser/ui/pdf/pdf_browsertest.cc
@@ -232,12 +232,12 @@ IN_PROC_BROWSER_TEST_F(PDFBrowserTest, MAYBE_Scroll) {
wheel_event.deltaY = -200;
wheel_event.wheelTicksY = -2;
TabContents* tab_contents = browser()->GetSelectedTabContents();
- tab_contents->render_view_host()->ForwardWheelEvent(wheel_event);
+ tab_contents->GetRenderViewHost()->ForwardWheelEvent(wheel_event);
ASSERT_NO_FATAL_FAILURE(WaitForResponse());
int y_offset = 0;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractInt(
- browser()->GetSelectedTabContents()->render_view_host(),
+ browser()->GetSelectedTabContents()->GetRenderViewHost(),
std::wstring(),
L"window.domAutomationController.send(plugin.pageYOffset())",
&y_offset));
@@ -266,7 +266,7 @@ IN_PROC_BROWSER_TEST_F(PDFBrowserTest, MAYBE_FindAndCopy) {
objects[ui::Clipboard::CBF_TEXT] = params;
clipboard.WriteObjects(objects);
- browser()->GetSelectedTabContents()->render_view_host()->Copy();
+ browser()->GetSelectedTabContents()->GetRenderViewHost()->Copy();
ASSERT_NO_FATAL_FAILURE(WaitForResponse());
std::string text;
@@ -317,7 +317,7 @@ IN_PROC_BROWSER_TEST_F(PDFBrowserTest, FLAKY_SLOW_Loading) {
// and before creating a byte-range request loader.
bool complete = false;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
- browser()->GetSelectedTabContents()->render_view_host(),
+ browser()->GetSelectedTabContents()->GetRenderViewHost(),
std::wstring(),
L"window.domAutomationController.send(plugin.documentLoadComplete())",
&complete));
@@ -350,7 +350,7 @@ IN_PROC_BROWSER_TEST_F(PDFBrowserTest, MAYBE_OnLoadAndReload) {
content::Source<NavigationController>(
&browser()->GetSelectedTabContents()->controller()));
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
- browser()->GetSelectedTabContents()->render_view_host(),
+ browser()->GetSelectedTabContents()->GetRenderViewHost(),
std::wstring(),
L"reloadPDF();"));
observer.Wait();
diff --git a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
index 4224b07..0663797 100644
--- a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
+++ b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
@@ -138,11 +138,11 @@ void OpenUsingReader(TabContentsWrapper* tab,
InfoBarDelegate* old_delegate,
InfoBarDelegate* new_delegate) {
ChromePluginServiceFilter::GetInstance()->OverridePluginForTab(
- tab->tab_contents()->render_view_host()->process()->GetID(),
- tab->tab_contents()->render_view_host()->routing_id(),
+ tab->tab_contents()->GetRenderProcessHost()->GetID(),
+ tab->tab_contents()->GetRenderViewHost()->routing_id(),
tab->tab_contents()->GetURL(),
ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName));
- tab->tab_contents()->render_view_host()->ReloadFrame();
+ tab->tab_contents()->GetRenderViewHost()->ReloadFrame();
if (new_delegate) {
if (old_delegate) {
@@ -404,6 +404,6 @@ void PDFHasUnsupportedFeature(TabContentsWrapper* tab) {
PluginService::GetInstance()->GetPluginGroups(
base::Bind(&GotPluginGroupsCallback,
- tab->tab_contents()->render_view_host()->process()->GetID(),
- tab->tab_contents()->render_view_host()->routing_id()));
+ tab->tab_contents()->GetRenderProcessHost()->GetID(),
+ tab->tab_contents()->GetRenderViewHost()->routing_id()));
}
diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc
index aae0a6a..3ea3f6ac 100644
--- a/chrome/browser/ui/prefs/prefs_tab_helper.cc
+++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc
@@ -429,11 +429,11 @@ void PrefsTabHelper::UpdateWebPreferences() {
WebPreferences prefs = rvhd->GetWebkitPrefs();
prefs.javascript_enabled =
per_tab_prefs_->GetBoolean(prefs::kWebKitJavascriptEnabled);
- tab_contents()->render_view_host()->UpdateWebkitPreferences(prefs);
+ tab_contents()->GetRenderViewHost()->UpdateWebkitPreferences(prefs);
}
void PrefsTabHelper::UpdateRendererPreferences() {
renderer_preferences_util::UpdateFromSystemSettings(
tab_contents()->GetMutableRendererPrefs(), wrapper_->profile());
- tab_contents()->render_view_host()->SyncRendererPrefs();
+ tab_contents()->GetRenderViewHost()->SyncRendererPrefs();
}
diff --git a/chrome/browser/ui/views/aura/app_list_window.cc b/chrome/browser/ui/views/aura/app_list_window.cc
index d0de9d8..1b3f9a0 100644
--- a/chrome/browser/ui/views/aura/app_list_window.cc
+++ b/chrome/browser/ui/views/aura/app_list_window.cc
@@ -107,7 +107,7 @@ void AppListWindow::Init(const gfx::Rect& bounds) {
background.allocPixels();
background.eraseARGB(0x00, 0x00, 0x00, 0x00);
- RenderViewHost* host = tab->render_view_host();
+ RenderViewHost* host = tab->GetRenderViewHost();
host->view()->SetBackground(background);
views::Widget::InitParams widget_params(
diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc
index 442b8dd..c1f19eb 100644
--- a/chrome/browser/ui/views/find_bar_host.cc
+++ b/chrome/browser/ui/views/find_bar_host.cc
@@ -70,7 +70,7 @@ bool FindBarHost::MaybeForwardKeyEventToWebpage(
return false;
RenderViewHost* render_view_host =
- contents->tab_contents()->render_view_host();
+ contents->tab_contents()->GetRenderViewHost();
// Make sure we don't have a text field element interfering with keyboard
// input. Otherwise Up and Down arrow key strokes get eaten. "Nom Nom Nom".
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index d16938a..04484ef 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1669,7 +1669,7 @@ void BrowserView::OnWindowBeginUserBoundsChange() {
TabContents* tab_contents = GetSelectedTabContents();
if (!tab_contents)
return;
- tab_contents->render_view_host()->NotifyMoveOrResizeStarted();
+ tab_contents->GetRenderViewHost()->NotifyMoveOrResizeStarted();
}
void BrowserView::OnWidgetMove() {
diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc
index 0c78d03..9c89b2e 100644
--- a/chrome/browser/ui/views/hung_renderer_view.cc
+++ b/chrome/browser/ui/views/hung_renderer_view.cc
@@ -132,7 +132,7 @@ content::RenderProcessHost* HungPagesTableModel::GetRenderProcessHost() {
RenderViewHost* HungPagesTableModel::GetRenderViewHost() {
return tab_observers_.empty() ? NULL :
- tab_observers_[0]->tab_contents()->render_view_host();
+ tab_observers_[0]->tab_contents()->GetRenderViewHost();
}
void HungPagesTableModel::InitForTabContents(TabContents* hung_contents) {
diff --git a/chrome/browser/ui/views/notifications/balloon_view_host.cc b/chrome/browser/ui/views/notifications/balloon_view_host.cc
index aebef32..3945f72 100644
--- a/chrome/browser/ui/views/notifications/balloon_view_host.cc
+++ b/chrome/browser/ui/views/notifications/balloon_view_host.cc
@@ -49,7 +49,7 @@ void BalloonViewHost::Init(gfx::NativeView parent_native_view) {
BalloonHost::Init();
RenderWidgetHostView* render_widget_host_view =
- tab_contents_->render_view_host()->view();
+ tab_contents_->GetRenderViewHost()->view();
native_host_->Attach(render_widget_host_view->GetNativeView());
}
diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc
index f2f21bb..4cb9ab6 100644
--- a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc
+++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc
@@ -48,7 +48,7 @@ class WebDragSourceAura : public MessageLoopForUI::Observer {
RenderViewHost* rvh = NULL;
switch (type) {
case ui::ET_MOUSE_DRAGGED:
- rvh = view_->GetTabContents()->render_view_host();
+ rvh = view_->GetTabContents()->GetRenderViewHost();
if (rvh) {
gfx::Point screen_loc = ui::EventLocationFromNative(event);
gfx::Point client_loc = screen_loc;
@@ -211,7 +211,7 @@ void NativeTabContentsViewAura::StartDragging(const WebDropData& drop_data,
MessageLoop::current()->SetNestableTasksAllowed(old_state);
EndDrag(ConvertToWeb(result_op));
- GetTabContents()->render_view_host()->DragSourceSystemDragEnded();
+ GetTabContents()->GetRenderViewHost()->DragSourceSystemDragEnded();
}
void NativeTabContentsViewAura::CancelDrag() {
@@ -268,7 +268,7 @@ void NativeTabContentsViewAura::OnDragEntered(
WebKit::WebDragOperationsMask op = ConvertToWeb(event.source_operations());
gfx::Point screen_pt = aura::RootWindow::GetInstance()->last_mouse_location();
- GetTabContents()->render_view_host()->DragTargetDragEnter(
+ GetTabContents()->GetRenderViewHost()->DragTargetDragEnter(
drop_data, event.location(), screen_pt, op);
}
@@ -276,18 +276,18 @@ int NativeTabContentsViewAura::OnDragUpdated(
const aura::DropTargetEvent& event) {
WebKit::WebDragOperationsMask op = ConvertToWeb(event.source_operations());
gfx::Point screen_pt = aura::RootWindow::GetInstance()->last_mouse_location();
- GetTabContents()->render_view_host()->DragTargetDragOver(
+ GetTabContents()->GetRenderViewHost()->DragTargetDragOver(
event.location(), screen_pt, op);
return ConvertFromWeb(current_drag_op_);
}
void NativeTabContentsViewAura::OnDragExited() {
- GetTabContents()->render_view_host()->DragTargetDragLeave();
+ GetTabContents()->GetRenderViewHost()->DragTargetDragLeave();
}
int NativeTabContentsViewAura::OnPerformDrop(
const aura::DropTargetEvent& event) {
- GetTabContents()->render_view_host()->DragTargetDrop(
+ GetTabContents()->GetRenderViewHost()->DragTargetDrop(
event.location(), aura::RootWindow::GetInstance()->last_mouse_location());
return current_drag_op_;
}
@@ -299,7 +299,7 @@ void NativeTabContentsViewAura::EndDrag(WebKit::WebDragOperationsMask ops) {
gfx::Point screen_loc =
aura::RootWindow::GetInstance()->last_mouse_location();
gfx::Point client_loc = screen_loc;
- RenderViewHost* rvh = GetTabContents()->render_view_host();
+ RenderViewHost* rvh = GetTabContents()->GetRenderViewHost();
aura::Window* window = rvh->view()->GetNativeView();
aura::Window::ConvertPointToWindow(aura::RootWindow::GetInstance(),
window, &client_loc);
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc
index 4f44b7b..a9ca3f4 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc
@@ -292,7 +292,7 @@ void TabContentsViewViews::TakeFocus(bool reverse) {
}
void TabContentsViewViews::CloseTab() {
- tab_contents_->Close(tab_contents_->render_view_host());
+ tab_contents_->Close(tab_contents_->GetRenderViewHost());
}
void TabContentsViewViews::CreateNewWindow(
@@ -305,12 +305,12 @@ void TabContentsViewViews::CreateNewWindow(
void TabContentsViewViews::CreateNewWidget(
int route_id, WebKit::WebPopupType popup_type) {
delegate_view_helper_.CreateNewWidget(route_id, popup_type,
- tab_contents_->render_view_host()->process());
+ tab_contents_->GetRenderProcessHost());
}
void TabContentsViewViews::CreateNewFullscreenWidget(int route_id) {
delegate_view_helper_.CreateNewFullscreenWidget(
- route_id, tab_contents_->render_view_host()->process());
+ route_id, tab_contents_->GetRenderProcessHost());
}
void TabContentsViewViews::ShowCreatedWindow(int route_id,
diff --git a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
index 86883cf..b346cd8 100644
--- a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
+++ b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
@@ -352,7 +352,7 @@ void KeyboardWidget::RenderViewGone(base::TerminationStatus status) {
void KeyboardWidget::OnRequest(const ExtensionHostMsg_Request_Params& request) {
extension_dispatcher_.Dispatch(request,
- dom_view_->dom_contents()->tab_contents()->render_view_host());
+ dom_view_->dom_contents()->tab_contents()->GetRenderViewHost());
}
void KeyboardWidget::TextInputTypeChanged(ui::TextInputType type,
diff --git a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
index 1d26652..b516cbd 100644
--- a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
+++ b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
@@ -82,7 +82,7 @@ void CloudPrintSigninFlowHandler::Observe(
url.path() == dialog_url.path() &&
url.scheme() == dialog_url.scheme()) {
StoreDialogSize();
- web_ui_->tab_contents()->render_view_host()->ClosePage();
+ web_ui_->tab_contents()->GetRenderViewHost()->ClosePage();
static_cast<PrintPreviewUI*>(
parent_tab_->web_ui())->OnReloadPrintersList();
}
diff --git a/chrome/browser/ui/webui/hung_renderer_dialog.cc b/chrome/browser/ui/webui/hung_renderer_dialog.cc
index 5f95776..228c464 100644
--- a/chrome/browser/ui/webui/hung_renderer_dialog.cc
+++ b/chrome/browser/ui/webui/hung_renderer_dialog.cc
@@ -186,8 +186,8 @@ void HungRendererDialog::OnDialogClosed(const std::string& json_retval) {
} else {
// No indication from the user that it is ok to kill anything. Just wait.
// Start waiting again for responsiveness.
- if (contents_ && contents_->render_view_host())
- contents_->render_view_host()->RestartHangMonitorTimeout();
+ if (contents_ && contents_->GetRenderViewHost())
+ contents_->GetRenderViewHost()->RestartHangMonitorTimeout();
}
}
g_instance = NULL;
diff --git a/chrome/browser/ui/webui/media/media_internals_handler.cc b/chrome/browser/ui/webui/media/media_internals_handler.cc
index 6798ad5..fc9a6be 100644
--- a/chrome/browser/ui/webui/media/media_internals_handler.cc
+++ b/chrome/browser/ui/webui/media/media_internals_handler.cc
@@ -43,7 +43,7 @@ void MediaInternalsMessageHandler::OnGetEverything(const ListValue* list) {
void MediaInternalsMessageHandler::OnUpdate(const string16& update) {
// Don't try to execute JavaScript in a RenderView that no longer exists.
- RenderViewHost* host = web_ui_->tab_contents()->render_view_host();
+ RenderViewHost* host = web_ui_->tab_contents()->GetRenderViewHost();
if (host)
host->ExecuteJavascriptInWebFrame(string16(), update);
}
diff --git a/chrome/browser/ui/webui/net_internals_ui_browsertest.cc b/chrome/browser/ui/webui/net_internals_ui_browsertest.cc
index 3cc5474..4ae132e 100644
--- a/chrome/browser/ui/webui/net_internals_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/net_internals_ui_browsertest.cc
@@ -257,7 +257,7 @@ void NetInternalsTest::MessageHandler::AddCacheEntry(
void NetInternalsTest::MessageHandler::NavigateToPrerender(
const ListValue* list_value) {
- RenderViewHost* host = browser()->GetTabContentsAt(1)->render_view_host();
+ RenderViewHost* host = browser()->GetTabContentsAt(1)->GetRenderViewHost();
host->ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16("Click()"));
}
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc b/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc
index 4a79f8e..feee76c 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc
@@ -26,7 +26,7 @@ IN_PROC_BROWSER_TEST_F(NewTabUIBrowserTest, ChromeInternalLoadsNTP) {
ui_test_utils::NavigateToURL(browser(), GURL("chrome-internal:"));
bool empty_inner_html = false;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
- browser()->GetTabContentsAt(0)->render_view_host(), L"",
+ browser()->GetTabContentsAt(0)->GetRenderViewHost(), L"",
L"window.domAutomationController.send(document.body.innerHTML == '')",
&empty_inner_html));
ASSERT_FALSE(empty_inner_html);
diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.cc b/chrome/browser/ui/webui/options/extension_settings_handler.cc
index 093b7a42..bf3c673 100644
--- a/chrome/browser/ui/webui/options/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/extension_settings_handler.cc
@@ -617,7 +617,7 @@ void ExtensionSettingsHandler::Observe(
break;
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED:
deleting_rvh_ = content::Details<BackgroundContents>(details)->
- tab_contents()->render_view_host();
+ tab_contents()->GetRenderViewHost();
// Fall through.
case chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED:
case chrome::NOTIFICATION_EXTENSION_HOST_CREATED:
@@ -646,7 +646,7 @@ const Extension* ExtensionSettingsHandler::GetExtension(const ListValue* args) {
void ExtensionSettingsHandler::MaybeUpdateAfterNotification() {
TabContents* contents = web_ui_->tab_contents();
- if (!ignore_notifications_ && contents && contents->render_view_host())
+ if (!ignore_notifications_ && contents && contents->GetRenderViewHost())
HandleRequestExtensionsData(NULL);
deleting_rvh_ = NULL;
}
diff --git a/chrome/browser/ui/webui/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview_handler.cc
index cc65922..4161476 100644
--- a/chrome/browser/ui/webui/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview_handler.cc
@@ -340,7 +340,7 @@ void PrintPreviewHandler::HandleGetPreview(const ListValue* args) {
}
VLOG(1) << "Print preview request start";
- RenderViewHost* rvh = initiator_tab->tab_contents()->render_view_host();
+ RenderViewHost* rvh = initiator_tab->tab_contents()->GetRenderViewHost();
rvh->Send(new PrintMsg_PrintPreview(rvh->routing_id(), *settings));
}
@@ -355,7 +355,7 @@ void PrintPreviewHandler::HandlePrint(const ListValue* args) {
TabContentsWrapper* initiator_tab = GetInitiatorTab();
CHECK(initiator_tab);
- RenderViewHost* init_rvh = initiator_tab->tab_contents()->render_view_host();
+ RenderViewHost* init_rvh = initiator_tab->tab_contents()->GetRenderViewHost();
init_rvh->Send(new PrintMsg_ResetScriptedPrintCount(init_rvh->routing_id()));
scoped_ptr<DictionaryValue> settings(GetSettingsDictionary(args));
@@ -421,7 +421,7 @@ void PrintPreviewHandler::HandlePrint(const ListValue* args) {
// The PDF being printed contains only the pages that the user selected,
// so ignore the page range and print all pages.
settings->Remove(printing::kSettingPageRange, NULL);
- RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host();
+ RenderViewHost* rvh = web_ui_->tab_contents()->GetRenderViewHost();
rvh->Send(new PrintMsg_PrintForPrintPreview(rvh->routing_id(), *settings));
}
initiator_tab->print_view_manager()->PrintPreviewDone();
diff --git a/chrome/browser/ui/webui/task_manager_handler.cc b/chrome/browser/ui/webui/task_manager_handler.cc
index 5fd1888..63ef9af 100644
--- a/chrome/browser/ui/webui/task_manager_handler.cc
+++ b/chrome/browser/ui/webui/task_manager_handler.cc
@@ -404,7 +404,7 @@ void TaskManagerHandler::EnableTaskManager(const ListValue* indexes) {
}
void TaskManagerHandler::OpenAboutMemory(const ListValue* indexes) {
- RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host();
+ RenderViewHost* rvh = web_ui_->tab_contents()->GetRenderViewHost();
if (rvh && rvh->delegate()) {
WebPreferences webkit_prefs = rvh->delegate()->GetWebkitPrefs();
webkit_prefs.allow_scripts_to_close_windows = true;
@@ -419,7 +419,7 @@ void TaskManagerHandler::OpenAboutMemory(const ListValue* indexes) {
// TaskManagerHandler, private: -----------------------------------------------
bool TaskManagerHandler::is_alive() {
- return web_ui_->tab_contents()->render_view_host() != NULL;
+ return web_ui_->tab_contents()->GetRenderViewHost() != NULL;
}
void TaskManagerHandler::UpdateResourceGroupTable(int start, int length) {
diff --git a/chrome/browser/ui/webui/tracing_ui.cc b/chrome/browser/ui/webui/tracing_ui.cc
index 8db166c..ab81f84 100644
--- a/chrome/browser/ui/webui/tracing_ui.cc
+++ b/chrome/browser/ui/webui/tracing_ui.cc
@@ -321,7 +321,7 @@ void TracingMessageHandler::LoadTraceFileComplete(std::string* file_contents) {
std::string javascript = "tracingController.onLoadTraceFileComplete("
+ *file_contents + ");";
- web_ui_->tab_contents()->render_view_host()->
+ web_ui_->tab_contents()->GetRenderViewHost()->
ExecuteJavascriptInWebFrame(string16(), UTF8ToUTF16(javascript));
}
@@ -395,7 +395,7 @@ void TracingMessageHandler::OnTraceDataCollected(
trace_buffer.Finish();
output.Append(");");
- web_ui_->tab_contents()->render_view_host()->
+ web_ui_->tab_contents()->GetRenderViewHost()->
ExecuteJavascriptInWebFrame(string16(), UTF8ToUTF16(output.json_output));
}
diff --git a/chrome/browser/ui/webui/web_ui_test_handler.cc b/chrome/browser/ui/webui/web_ui_test_handler.cc
index 72e9999..69efe4c 100644
--- a/chrome/browser/ui/webui/web_ui_test_handler.cc
+++ b/chrome/browser/ui/webui/web_ui_test_handler.cc
@@ -33,14 +33,14 @@ void WebUITestHandler::PreloadJavaScript(const string16& js_text,
}
void WebUITestHandler::RunJavaScript(const string16& js_text) {
- web_ui_->tab_contents()->render_view_host()->ExecuteJavascriptInWebFrame(
+ web_ui_->tab_contents()->GetRenderViewHost()->ExecuteJavascriptInWebFrame(
string16(), js_text);
}
bool WebUITestHandler::RunJavaScriptTestWithResult(const string16& js_text) {
test_succeeded_ = false;
run_test_succeeded_ = false;
- RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host();
+ RenderViewHost* rvh = web_ui_->tab_contents()->GetRenderViewHost();
content::NotificationRegistrar notification_registrar;
notification_registrar.Add(
this, content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT,
diff --git a/chrome/browser/ui/webui/web_ui_unittest.cc b/chrome/browser/ui/webui/web_ui_unittest.cc
index 09ae9eb..eeb3d0d 100644
--- a/chrome/browser/ui/webui/web_ui_unittest.cc
+++ b/chrome/browser/ui/webui/web_ui_unittest.cc
@@ -44,7 +44,7 @@ class WebUITest : public TabContentsWrapperTestHarness {
// Now commit the load.
static_cast<TestRenderViewHost*>(
- contents->render_view_host())->SendNavigate(page_id, new_tab_url);
+ contents->GetRenderViewHost())->SendNavigate(page_id, new_tab_url);
// The same flags should be set as before now that the load has committed.
EXPECT_FALSE(wrapper->favicon_tab_helper()->ShouldDisplayFavicon());
@@ -72,7 +72,7 @@ class WebUITest : public TabContentsWrapperTestHarness {
pending_render_view_host())->SendNavigate(page_id + 1, next_url);
} else {
static_cast<TestRenderViewHost*>(
- contents->render_view_host())->SendNavigate(page_id + 1, next_url);
+ contents->GetRenderViewHost())->SendNavigate(page_id + 1, next_url);
}
// The state should now reflect a regular page.
diff --git a/chrome/browser/ui/webui/workers_ui_browsertest.cc b/chrome/browser/ui/webui/workers_ui_browsertest.cc
index b14ab2b..d864771 100644
--- a/chrome/browser/ui/webui/workers_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/workers_ui_browsertest.cc
@@ -50,7 +50,7 @@ IN_PROC_BROWSER_TEST_F(WorkersUITest, MAYBE_SharedWorkersList) {
std::string result;
ASSERT_TRUE(
ui_test_utils::ExecuteJavaScriptAndExtractString(
- tab_contents->render_view_host(),
+ tab_contents->GetRenderViewHost(),
L"",
L"window.domAutomationController.send("
L"'' + document.getElementsByTagName('td')[1].textContent);",