summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/browser_focus_uitest.cc2
-rw-r--r--chrome/browser/chromeos/external_protocol_dialog.cc2
-rw-r--r--chrome/browser/debugger/devtools_window.cc6
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc2
-rw-r--r--chrome/browser/instant/instant_loader.cc4
-rw-r--r--chrome/browser/prerender/prerender_contents.cc7
-rw-r--r--chrome/browser/printing/print_dialog_cloud.cc5
-rw-r--r--chrome/browser/sessions/session_restore.cc2
-rw-r--r--chrome/browser/sidebar/sidebar_container.cc2
-rw-r--r--chrome/browser/speech/speech_input_bubble_mac.mm4
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc2
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc4
-rw-r--r--chrome/browser/ui/browser.cc8
-rw-r--r--chrome/browser/ui/browser_init.cc2
-rw-r--r--chrome/browser/ui/browser_navigator_browsertest.cc2
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/constrained_window_mac.mm2
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_view_mac.mm2
-rw-r--r--chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.mm2
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm4
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/constrained_window_gtk.cc6
-rw-r--r--chrome/browser/ui/gtk/extensions/extension_view_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/web_intent_picker_gtk.cc2
-rw-r--r--chrome/browser/ui/sad_tab_observer.cc6
-rw-r--r--chrome/browser/ui/views/extensions/extension_view.cc2
-rw-r--r--chrome/browser/ui/views/find_bar_host.cc2
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc10
-rw-r--r--chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc2
-rw-r--r--chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc2
-rw-r--r--chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.cc2
-rw-r--r--chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc2
-rw-r--r--chrome/browser/ui/webui/cloud_print_signin_dialog.cc4
-rw-r--r--chrome/browser/ui/webui/options/advanced_options_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options/advanced_options_utils_win.cc2
-rw-r--r--chrome/browser/ui/webui/options/certificate_manager_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options/extension_settings_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options2/advanced_options_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options2/advanced_options_utils_win.cc2
-rw-r--r--chrome/browser/ui/webui/options2/certificate_manager_handler.cc2
-rw-r--r--chrome/browser/ui/webui/tracing_ui.cc4
-rw-r--r--content/browser/tab_contents/interstitial_page.cc2
-rw-r--r--content/browser/tab_contents/tab_contents.cc26
-rw-r--r--content/browser/tab_contents/tab_contents.h14
-rw-r--r--content/browser/tab_contents/tab_contents_view_win.cc2
-rw-r--r--content/browser/tab_contents/web_drag_source_gtk.cc2
-rw-r--r--content/public/browser/web_contents.h13
-rw-r--r--content/shell/shell.cc2
51 files changed, 105 insertions, 94 deletions
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index 3f68223..228cdc2 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -296,7 +296,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_TabsRememberFocus) {
// Activate the location bar or the page.
if (kFocusPage[i][j]) {
- browser()->GetTabContentsAt(j)->view()->Focus();
+ browser()->GetTabContentsAt(j)->GetView()->Focus();
} else {
browser()->FocusLocationBar();
}
diff --git a/chrome/browser/chromeos/external_protocol_dialog.cc b/chrome/browser/chromeos/external_protocol_dialog.cc
index b293fe6..fc279c6 100644
--- a/chrome/browser/chromeos/external_protocol_dialog.cc
+++ b/chrome/browser/chromeos/external_protocol_dialog.cc
@@ -117,7 +117,7 @@ ExternalProtocolDialog::ExternalProtocolDialog(TabContents* tab_contents,
gfx::NativeWindow parent_window;
if (tab_contents) {
- parent_window = tab_contents->view()->GetTopLevelNativeWindow();
+ parent_window = tab_contents->GetView()->GetTopLevelNativeWindow();
} else {
// Dialog is top level if we don't have a tab_contents associated with us.
parent_window = NULL;
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc
index 05d623e..b5280df 100644
--- a/chrome/browser/debugger/devtools_window.cc
+++ b/chrome/browser/debugger/devtools_window.cc
@@ -266,7 +266,7 @@ void DevToolsWindow::Show(DevToolsToggleAction action) {
BrowserWindow* inspected_window = inspected_browser->window();
tab_contents_->tab_contents()->SetDelegate(this);
inspected_window->UpdateDevTools();
- tab_contents_->tab_contents()->view()->SetInitialFocus();
+ tab_contents_->tab_contents()->GetView()->SetInitialFocus();
inspected_window->Show();
TabStripModel* tabstrip_model = inspected_browser->tabstrip_model();
tabstrip_model->ActivateTabAt(inspected_tab_index, true);
@@ -289,7 +289,7 @@ void DevToolsWindow::Show(DevToolsToggleAction action) {
if (should_show_window) {
browser_->window()->Show();
- tab_contents_->tab_contents()->view()->SetInitialFocus();
+ tab_contents_->tab_contents()->GetView()->SetInitialFocus();
}
ScheduleAction(action);
@@ -647,7 +647,7 @@ void DevToolsWindow::ActivateWindow() {
} else {
BrowserWindow* inspected_window = GetInspectedBrowserWindow();
if (inspected_window)
- tab_contents_->tab_contents()->view()->Focus();
+ tab_contents_->tab_contents()->GetView()->Focus();
}
}
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 28ab045..9a4ee58 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -931,7 +931,7 @@ bool CreateTabFunction::RunImpl() {
browser::Navigate(&params);
if (active)
- params.target_contents->tab_contents()->view()->SetInitialFocus();
+ params.target_contents->tab_contents()->GetView()->SetInitialFocus();
// Return data about the newly created tab.
if (has_callback()) {
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index 8411ddf..a04969e 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -1051,8 +1051,8 @@ void InstantLoader::SetupPreviewContents(TabContentsWrapper* tab_contents) {
&preview_contents_->tab_contents()->GetController()));
gfx::Rect tab_bounds;
- tab_contents->tab_contents()->view()->GetContainerBounds(&tab_bounds);
- preview_contents_->tab_contents()->view()->SizeContents(tab_bounds.size());
+ tab_contents->tab_contents()->GetView()->GetContainerBounds(&tab_bounds);
+ preview_contents_->tab_contents()->GetView()->SizeContents(tab_bounds.size());
}
void InstantLoader::CreatePreviewContents(TabContentsWrapper* tab_contents) {
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index b88c8d8..1c493e3 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -250,7 +250,7 @@ void PrerenderContents::StartPrerendering(
starting_page_id_ = source_tc->GetMaxPageID();
// Set the size of the new TC to that of the old TC.
- source_tc->view()->GetContainerBounds(&tab_bounds);
+ source_tc->GetView()->GetContainerBounds(&tab_bounds);
}
} else {
int max_page_id = -1;
@@ -276,7 +276,7 @@ void PrerenderContents::StartPrerendering(
if (active_browser) {
TabContents* active_tab_contents = active_browser->GetTabContentsAt(
active_browser->active_index());
- active_tab_contents->view()->GetContainerBounds(&tab_bounds);
+ active_tab_contents->GetView()->GetContainerBounds(&tab_bounds);
}
}
@@ -292,7 +292,8 @@ void PrerenderContents::StartPrerendering(
new_contents->SetDelegate(tab_contents_delegate_.get());
// Set the size of the prerender TabContents.
- prerender_contents_->tab_contents()->view()->SizeContents(tab_bounds.size());
+ prerender_contents_->tab_contents()->GetView()->SizeContents(
+ tab_bounds.size());
// Register as an observer of the RenderViewHost so we get messages.
render_view_host_observer_.reset(
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index dbf767b..d0f2248 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -427,8 +427,9 @@ void CloudPrintFlowHandler::HandleSetPageParameters(const ListValue* args) {
}
void CloudPrintFlowHandler::StoreDialogClientSize() const {
- if (web_ui_ && web_ui_->tab_contents() && web_ui_->tab_contents()->view()) {
- gfx::Size size = web_ui_->tab_contents()->view()->GetContainerSize();
+ if (web_ui_ && web_ui_->tab_contents() &&
+ web_ui_->tab_contents()->GetView()) {
+ gfx::Size size = web_ui_->tab_contents()->GetView()->GetContainerSize();
Profile* profile = Profile::FromWebUI(web_ui_);
profile->GetPrefs()->SetInteger(prefs::kCloudPrintDialogWidth,
size.width());
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index fefce53..5be29d0 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -761,7 +761,7 @@ class SessionRestoreImpl : public content::NotificationObserver {
// TODO(jcampan): http://crbug.com/8123 we should not need to set the
// initial focus explicitly.
- browser->GetSelectedTabContents()->view()->SetInitialFocus();
+ browser->GetSelectedTabContents()->GetView()->SetInitialFocus();
if (!browser_shown_) {
browser_shown_ = true;
diff --git a/chrome/browser/sidebar/sidebar_container.cc b/chrome/browser/sidebar/sidebar_container.cc
index 1dbb3d9..17b83c4 100644
--- a/chrome/browser/sidebar/sidebar_container.cc
+++ b/chrome/browser/sidebar/sidebar_container.cc
@@ -79,7 +79,7 @@ void SidebarContainer::Expand() {
}
delegate_->UpdateSidebar(this);
- sidebar_contents_->view()->SetInitialFocus();
+ sidebar_contents_->GetView()->SetInitialFocus();
}
void SidebarContainer::Collapse() {
diff --git a/chrome/browser/speech/speech_input_bubble_mac.mm b/chrome/browser/speech/speech_input_bubble_mac.mm
index 3d7b146..8d871425 100644
--- a/chrome/browser/speech/speech_input_bubble_mac.mm
+++ b/chrome/browser/speech/speech_input_bubble_mac.mm
@@ -66,8 +66,8 @@ void SpeechInputBubbleImpl::Show() {
// arrow anchor point inside that to point at the bottom-left of the html
// input element rect if the position is valid, otherwise point it towards
// the page icon in the omnibox.
- gfx::NativeView view = tab_contents()->view()->GetNativeView();
- NSWindow* parentWindow = tab_contents()->view()->GetTopLevelNativeWindow();
+ gfx::NativeView view = tab_contents()->GetView()->GetNativeView();
+ NSWindow* parentWindow = tab_contents()->GetView()->GetTopLevelNativeWindow();
NSRect tab_bounds = [view bounds];
int anchor_x = tab_bounds.origin.x + element_rect_.x() +
element_rect_.width() - kBubbleTargetOffsetX;
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index b513795..f3f8cc3 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -176,7 +176,7 @@ TabContents* RenderViewHostDelegateViewHelper::CreateNewWindow(
base_tab_contents,
NULL);
new_contents->set_opener_web_ui_type(webui_type);
- TabContentsView* new_view = new_contents->view();
+ TabContentsView* new_view = new_contents->GetView();
// TODO(brettw) it seems bogus that we have to call this function on the
// newly created object and give it one of its own member variables.
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 7837cff..3a2be64 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -724,9 +724,9 @@ void TabStripModel::AddTabContents(TabContentsWrapper* contents,
// new background tab.
if (TabContentsWrapper* old_contents = GetActiveTabContents()) {
if ((add_types & ADD_ACTIVE) == 0) {
- contents->tab_contents()->view()->
+ contents->tab_contents()->GetView()->
SizeContents(old_contents->tab_contents()->
- view()->GetContainerSize());
+ GetView()->GetContainerSize());
// We need to hide the contents or else we get and execute paints for
// background tabs. With enough background tabs they will steal the
// backing store of the visible tab causing flashing. See bug 20831.
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index bd915fb..0546c13 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -709,7 +709,7 @@ TabContents* Browser::OpenApplicationWindow(
// TODO(jcampan): http://crbug.com/8123 we should not need to set the initial
// focus explicitly.
- contents->view()->SetInitialFocus();
+ contents->GetView()->SetInitialFocus();
return contents;
}
@@ -1326,7 +1326,7 @@ TabContents* Browser::AddRestoredTab(
// anchor link location calculations to be incorrect even after a new
// layout with proper view dimensions. TabStripModel::AddTabContents()
// contains similar logic.
- new_tab->view()->SizeContents(window_->GetRestoredBounds().size());
+ new_tab->GetView()->SizeContents(window_->GetRestoredBounds().size());
new_tab->HideContents();
new_tab->GetController().LoadIfNecessary();
}
@@ -1655,7 +1655,7 @@ void Browser::NewTab() {
if (is_type_tabbed()) {
AddBlankTab(true);
- GetSelectedTabContentsWrapper()->tab_contents()->view()->RestoreFocus();
+ GetSelectedTabContentsWrapper()->tab_contents()->GetView()->RestoreFocus();
} else {
Browser* b = GetOrCreateTabbedBrowser(profile_);
b->AddBlankTab(true);
@@ -1663,7 +1663,7 @@ void Browser::NewTab() {
// The call to AddBlankTab above did not set the focus to the tab as its
// window was not active, so we have to do it explicitly.
// See http://crbug.com/6380.
- b->GetSelectedTabContentsWrapper()->tab_contents()->view()->RestoreFocus();
+ b->GetSelectedTabContentsWrapper()->tab_contents()->GetView()->RestoreFocus();
}
}
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index 0082b6e..12f2f0a 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -1209,7 +1209,7 @@ Browser* BrowserInit::LaunchWithProfile::OpenTabsInBrowser(
browser->window()->Show();
// TODO(jcampan): http://crbug.com/8123 we should not need to set the initial
// focus explicitly.
- browser->GetSelectedTabContents()->view()->SetInitialFocus();
+ browser->GetSelectedTabContents()->GetView()->SetInitialFocus();
return browser;
}
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index ff87b01..f652053 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -662,7 +662,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, DISABLED_TargetContents_Popup) {
// All platforms should respect size however provided width > 400 (Mac has a
// minimum window width of 400).
EXPECT_EQ(p.window_bounds.size(),
- p.target_contents->tab_contents()->view()->GetContainerSize());
+ p.target_contents->tab_contents()->GetView()->GetContainerSize());
// We should have two windows, the new popup and the browser() provided by the
// framework.
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index 569839f..a77a617 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -2280,7 +2280,7 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
- (int)currentTabContentsHeight {
TabContents* tc = browser_->GetSelectedTabContents();
- return tc ? tc->view()->GetContainerSize().height() : 0;
+ return tc ? tc->GetView()->GetContainerSize().height() : 0;
}
- (ui::ThemeProvider*)themeProvider {
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index 8051e4d..9be9200 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -702,7 +702,7 @@ enum {
// If the intrinsic width is bigger, then make it the zoomed width.
const int kScrollbarWidth = 16; // TODO(viettrungluu): ugh.
TabContentsViewMac* tab_contents_view =
- static_cast<TabContentsViewMac*>(contents->view());
+ static_cast<TabContentsViewMac*>(contents->GetView());
CGFloat intrinsicWidth = static_cast<CGFloat>(
tab_contents_view->preferred_width() + kScrollbarWidth);
zoomedWidth = std::max(zoomedWidth,
diff --git a/chrome/browser/ui/cocoa/constrained_window_mac.mm b/chrome/browser/ui/cocoa/constrained_window_mac.mm
index 16f0214..ddb038b 100644
--- a/chrome/browser/ui/cocoa/constrained_window_mac.mm
+++ b/chrome/browser/ui/cocoa/constrained_window_mac.mm
@@ -106,7 +106,7 @@ void ConstrainedWindowMac::ShowConstrainedWindow() {
// this case, open the sheet now. Else, Realize() will be called later, when
// our tab becomes visible.
NSWindow* browserWindow =
- wrapper_->tab_contents()->view()->GetTopLevelNativeWindow();
+ wrapper_->tab_contents()->GetView()->GetTopLevelNativeWindow();
NSWindowController* controller = [browserWindow windowController];
if (controller != nil) {
DCHECK([controller isKindOfClass:[BrowserWindowController class]]);
diff --git a/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm b/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm
index 2d9b948..b270e79 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_view_mac.mm
@@ -34,7 +34,7 @@ void ExtensionViewMac::Init() {
}
gfx::NativeView ExtensionViewMac::native_view() {
- return extension_host_->host_contents()->view()->GetNativeView();
+ return extension_host_->host_contents()->GetView()->GetNativeView();
}
RenderViewHost* ExtensionViewMac::render_view_host() const {
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 5052b8b..d1e5405 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
@@ -468,7 +468,7 @@ const float kRightEdgeOffset = 25;
// Get the size of the container.
gfx::Rect container_rect(
- contents->tab_contents()->view()->GetContainerSize());
+ contents->tab_contents()->GetView()->GetContainerSize());
// Position the FindBar on the top right corner.
view_rect.set_x(
diff --git a/chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.mm b/chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.mm
index 4d71835..72c1710 100644
--- a/chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.mm
+++ b/chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.mm
@@ -18,7 +18,7 @@ BalloonViewHost::~BalloonViewHost() {
}
void BalloonViewHost::UpdateActualSize(const gfx::Size& new_size) {
- tab_contents_->view()->SizeContents(new_size);
+ tab_contents_->GetView()->SizeContents(new_size);
NSView* view = native_view();
NSRect frame = [view frame];
frame.size.width = new_size.width();
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index c659cfd..a5988c6 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -1184,7 +1184,7 @@ private:
TabContentsController* oldController =
[tabContentsArray_ objectAtIndex:oldIndex];
[oldController willBecomeUnselectedTab];
- oldContents->tab_contents()->view()->StoreFocus();
+ oldContents->tab_contents()->GetView()->StoreFocus();
oldContents->tab_contents()->WasHidden();
}
}
@@ -1221,7 +1221,7 @@ private:
if (newContents) {
newContents->tab_contents()->DidBecomeSelected();
- newContents->tab_contents()->view()->RestoreFocus();
+ newContents->tab_contents()->GetView()->RestoreFocus();
if (newContents->find_tab_helper()->find_ui_active())
browser_->GetFindBarController()->find_bar()->SetFocusAndSelection();
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
index b719f2f..fa932b4 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
@@ -683,11 +683,11 @@ bool BookmarkBarGtk::GetTabContentsSize(gfx::Size* size) {
// so don't NOTREACHED() and error the program.
return false;
}
- if (!tab_contents->view()) {
+ if (!tab_contents->GetView()) {
NOTREACHED();
return false;
}
- *size = tab_contents->view()->GetContainerSize();
+ *size = tab_contents->GetView()->GetContainerSize();
return true;
}
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index d9961b3..e840aac 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -1257,7 +1257,7 @@ void BrowserWindowGtk::ActiveTabChanged(TabContentsWrapper* old_contents,
bool user_gesture) {
TRACE_EVENT0("ui::gtk", "BrowserWindowGtk::ActiveTabChanged");
if (old_contents && !old_contents->tab_contents()->is_being_destroyed())
- old_contents->tab_contents()->view()->StoreFocus();
+ old_contents->tab_contents()->GetView()->StoreFocus();
// Update various elements that are interested in knowing the current
// TabContents.
@@ -1269,7 +1269,7 @@ void BrowserWindowGtk::ActiveTabChanged(TabContentsWrapper* old_contents,
// TODO(estade): after we manage browser activation, add a check to make sure
// we are the active browser before calling RestoreFocus().
if (!browser_->tabstrip_model()->closing_all()) {
- new_contents->tab_contents()->view()->RestoreFocus();
+ new_contents->tab_contents()->GetView()->RestoreFocus();
if (new_contents->find_tab_helper()->find_ui_active())
browser_->GetFindBarController()->find_bar()->SetFocusAndSelection();
}
diff --git a/chrome/browser/ui/gtk/constrained_window_gtk.cc b/chrome/browser/ui/gtk/constrained_window_gtk.cc
index 65004ace..513f72e 100644
--- a/chrome/browser/ui/gtk/constrained_window_gtk.cc
+++ b/chrome/browser/ui/gtk/constrained_window_gtk.cc
@@ -126,7 +126,7 @@ void ConstrainedWindowGtk::FocusConstrainedWindow() {
// TODO(estade): this define should not need to be here because this class
// should not be used on linux/views.
#if defined(TOOLKIT_GTK)
- static_cast<TabContentsViewGtk*>(wrapper_->tab_contents()->view())->
+ static_cast<TabContentsViewGtk*>(wrapper_->tab_contents()->GetView())->
SetFocusedWidget(focus_widget);
#endif
}
@@ -136,11 +136,11 @@ ConstrainedWindowGtk::TabContentsViewType*
ConstrainedWindowGtk::ContainingView() {
#if defined(TOOLKIT_VIEWS)
return static_cast<NativeTabContentsViewGtk*>(
- static_cast<TabContentsViewViews*>(wrapper_->tab_contents()->view())->
+ static_cast<TabContentsViewViews*>(wrapper_->tab_contents()->GetView())->
native_tab_contents_view());
#else
return static_cast<TabContentsViewType*>(
- static_cast<TabContentsViewGtk*>(wrapper_->tab_contents()->view())->
+ static_cast<TabContentsViewGtk*>(wrapper_->tab_contents()->GetView())->
wrapper());
#endif
}
diff --git a/chrome/browser/ui/gtk/extensions/extension_view_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_view_gtk.cc
index baa6a63..0f7941b 100644
--- a/chrome/browser/ui/gtk/extensions/extension_view_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/extension_view_gtk.cc
@@ -23,7 +23,7 @@ void ExtensionViewGtk::Init() {
}
gfx::NativeView ExtensionViewGtk::native_view() {
- return extension_host_->host_contents()->view()->GetNativeView();
+ return extension_host_->host_contents()->GetView()->GetNativeView();
}
RenderViewHost* ExtensionViewGtk::render_view_host() const {
diff --git a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
index 1a1f547..0cee824 100644
--- a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
+++ b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
@@ -289,7 +289,7 @@ TabContents* WebIntentPickerGtk::SetInlineDisposition(const GURL& url) {
// TODO(gbillock): This size calculation needs more thought.
// Move up to WebIntentPicker?
- gfx::Size tab_size = wrapper_->tab_contents()->view()->GetContainerSize();
+ gfx::Size tab_size = wrapper_->tab_contents()->GetView()->GetContainerSize();
int width = std::max(tab_size.width()/2, kMainContentWidth);
int height = std::max(tab_size.height()/2, kMainContentWidth);
gtk_widget_set_size_request(tab_contents_container_->widget(),
diff --git a/chrome/browser/ui/sad_tab_observer.cc b/chrome/browser/ui/sad_tab_observer.cc
index 4269459..3e32108 100644
--- a/chrome/browser/ui/sad_tab_observer.cc
+++ b/chrome/browser/ui/sad_tab_observer.cc
@@ -39,7 +39,7 @@ void SadTabObserver::RenderViewGone(base::TerminationStatus status) {
return;
gfx::NativeView view = AcquireSadTab(status);
- tab_contents()->view()->InstallOverlayView(view);
+ tab_contents()->GetView()->InstallOverlayView(view);
}
void SadTabObserver::Observe(int type,
@@ -48,7 +48,7 @@ void SadTabObserver::Observe(int type,
switch (type) {
case content::NOTIFICATION_TAB_CONTENTS_CONNECTED:
if (HasSadTab()) {
- tab_contents()->view()->RemoveOverlayView();
+ tab_contents()->GetView()->RemoveOverlayView();
ReleaseSadTab();
}
break;
@@ -73,7 +73,7 @@ gfx::NativeView SadTabObserver::AcquireSadTab(base::TerminationStatus status) {
// and later re-parent it.
// TODO(avi): This is a cheat. Can this be made cleaner?
sad_tab_params.parent_widget =
- static_cast<TabContentsViewViews*>(tab_contents()->view());
+ static_cast<TabContentsViewViews*>(tab_contents()->GetView());
sad_tab_params.ownership =
views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
sad_tab_.reset(new views::Widget);
diff --git a/chrome/browser/ui/views/extensions/extension_view.cc b/chrome/browser/ui/views/extensions/extension_view.cc
index 2ad4aab..f01fee4 100644
--- a/chrome/browser/ui/views/extensions/extension_view.cc
+++ b/chrome/browser/ui/views/extensions/extension_view.cc
@@ -76,7 +76,7 @@ void ExtensionView::SetVisible(bool is_visible) {
void ExtensionView::CreateWidgetHostView() {
DCHECK(!initialized_);
initialized_ = true;
- Attach(host_->host_contents()->view()->GetNativeView());
+ Attach(host_->host_contents()->GetView()->GetNativeView());
host_->CreateRenderViewSoon();
SetVisible(false);
}
diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc
index c1f19eb..d6c0851 100644
--- a/chrome/browser/ui/views/find_bar_host.cc
+++ b/chrome/browser/ui/views/find_bar_host.cc
@@ -321,7 +321,7 @@ void FindBarHost::UnregisterAccelerators() {
void FindBarHost::GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect) {
gfx::Rect frame_rect = host()->GetTopLevelWidget()->GetWindowScreenBounds();
TabContentsView* tab_view =
- find_bar_controller_->tab_contents()->tab_contents()->view();
+ find_bar_controller_->tab_contents()->tab_contents()->GetView();
gfx::Rect webcontents_rect;
tab_view->GetViewBounds(&webcontents_rect);
avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y());
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 04484ef..91f1463 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -223,8 +223,8 @@ void BookmarkExtensionBackground::Paint(gfx::Canvas* canvas,
// Draw the background to match the new tab page.
int height = 0;
TabContents* contents = browser_->GetSelectedTabContents();
- if (contents && contents->view())
- height = contents->view()->GetContainerSize().height();
+ if (contents && contents->GetView())
+ height = contents->GetView()->GetContainerSize().height();
NtpBackgroundUtil::PaintBackgroundDetachedMode(
host_view_->GetThemeProvider(), canvas,
gfx::Rect(0, toolbar_overlap, host_view_->width(),
@@ -877,7 +877,7 @@ void BrowserView::FullScreenStateChanged() {
void BrowserView::RestoreFocus() {
TabContents* selected_tab_contents = GetSelectedTabContents();
if (selected_tab_contents)
- selected_tab_contents->view()->RestoreFocus();
+ selected_tab_contents->GetView()->RestoreFocus();
}
LocationBar* BrowserView::GetLocationBar() const {
@@ -1434,7 +1434,7 @@ void BrowserView::TabDeactivated(TabContentsWrapper* contents) {
// Some reports seem to show that the focus manager and/or focused view can
// be garbage at that point, it is not clear why.
if (!contents->tab_contents()->is_being_destroyed())
- contents->tab_contents()->view()->StoreFocus();
+ contents->tab_contents()->GetView()->StoreFocus();
}
void BrowserView::ActiveTabChanged(TabContentsWrapper* old_contents,
@@ -2605,7 +2605,7 @@ void BrowserView::ProcessTabSelected(TabContentsWrapper* new_contents) {
!browser_->tabstrip_model()->closing_all() && GetWidget()->IsVisible()) {
// We only restore focus if our window is visible, to avoid invoking blur
// handlers when we are eventually shown.
- new_contents->tab_contents()->view()->RestoreFocus();
+ new_contents->tab_contents()->GetView()->RestoreFocus();
}
// Update all the UI bits.
diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc
index e6e1dc7..3a5c73d 100644
--- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc
+++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc
@@ -39,7 +39,7 @@ void NativeTabContentsContainerGtk::DetachContents(TabContents* contents) {
// Now detach the TabContents.
Detach();
- static_cast<TabContentsViewViews*>(contents->view())->Unparent();
+ static_cast<TabContentsViewViews*>(contents->GetView())->Unparent();
}
void NativeTabContentsContainerGtk::SetFastResize(bool fast_resize) {
diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc
index eb4e191..b2f7f00 100644
--- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc
+++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc
@@ -53,7 +53,7 @@ void NativeTabContentsContainerWin::DetachContents(TabContents* contents) {
ShowWindow(container_hwnd, SW_HIDE);
// Reset the parent to NULL to ensure hidden tabs don't receive messages.
- static_cast<TabContentsViewViews*>(contents->view())->Unparent();
+ static_cast<TabContentsViewViews*>(contents->GetView())->Unparent();
}
}
diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.cc
index 1a0c0ac..730e797 100644
--- a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.cc
+++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.cc
@@ -298,7 +298,7 @@ void NativeTabContentsViewWin::ScrollCommon(UINT message, int scroll_type,
if (!ScrollZoom(scroll_type)) {
// Reflect scroll message to the view() to give it a chance
// to process scrolling.
- SendMessage(delegate_->GetTabContents()->view()->GetContentNativeView(),
+ SendMessage(delegate_->GetTabContents()->GetView()->GetContentNativeView(),
message, MAKELONG(scroll_type, position),
reinterpret_cast<LPARAM>(scrollbar));
}
diff --git a/chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc b/chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc
index 4d960d4..8cd33e1 100644
--- a/chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc
+++ b/chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc
@@ -33,7 +33,7 @@ RenderViewContextMenuViews::~RenderViewContextMenuViews() {
void RenderViewContextMenuViews::RunMenuAt(int x, int y) {
TabContentsViewViews* tab =
- static_cast<TabContentsViewViews*>(source_tab_contents_->view());
+ static_cast<TabContentsViewViews*>(source_tab_contents_->GetView());
views::Widget* parent = tab->GetTopLevelWidget();
if (menu_runner_->RunMenuAt(parent, NULL,
gfx::Rect(gfx::Point(x, y), gfx::Size()),
diff --git a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
index 6e3b6ce..5742e18 100644
--- a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
+++ b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
@@ -91,8 +91,8 @@ void CloudPrintSigninFlowHandler::Observe(
}
void CloudPrintSigninFlowHandler::StoreDialogSize() {
- if (web_ui_ && web_ui_->tab_contents() && web_ui_->tab_contents()->view()) {
- gfx::Size size = web_ui_->tab_contents()->view()->GetContainerSize();
+ if (web_ui_ && web_ui_->tab_contents() && web_ui_->tab_contents()->GetView()) {
+ gfx::Size size = web_ui_->tab_contents()->GetView()->GetContainerSize();
Profile* profile = Profile::FromWebUI(web_ui_);
profile->GetPrefs()->SetInteger(prefs::kCloudPrintSigninDialogWidth,
size.width());
diff --git a/chrome/browser/ui/webui/options/advanced_options_handler.cc b/chrome/browser/ui/webui/options/advanced_options_handler.cc
index a5ee304..962b4ef 100644
--- a/chrome/browser/ui/webui/options/advanced_options_handler.cc
+++ b/chrome/browser/ui/webui/options/advanced_options_handler.cc
@@ -352,7 +352,7 @@ void AdvancedOptionsHandler::HandleSelectDownloadLocation(
l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE),
pref_service->GetFilePath(prefs::kDownloadDefaultDirectory),
NULL, 0, FILE_PATH_LITERAL(""), web_ui_->tab_contents(),
- web_ui_->tab_contents()->view()->GetTopLevelNativeWindow(), NULL);
+ web_ui_->tab_contents()->GetView()->GetTopLevelNativeWindow(), NULL);
}
void AdvancedOptionsHandler::FileSelected(const FilePath& path, int index,
diff --git a/chrome/browser/ui/webui/options/advanced_options_utils_win.cc b/chrome/browser/ui/webui/options/advanced_options_utils_win.cc
index 2e26678..88b9dc8 100644
--- a/chrome/browser/ui/webui/options/advanced_options_utils_win.cc
+++ b/chrome/browser/ui/webui/options/advanced_options_utils_win.cc
@@ -62,7 +62,7 @@ void AdvancedOptionsUtilities::ShowManageSSLCertificates(
#if defined(USE_AURA)
NULL;
#else
- tab_contents->view()->GetTopLevelNativeWindow();
+ tab_contents->GetView()->GetTopLevelNativeWindow();
#endif
::CryptUIDlgCertMgr(&cert_mgr);
}
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
index e33ddf0..c1a76b7 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
@@ -1042,5 +1042,5 @@ void CertificateManagerHandler::CheckTpmTokenReady(const ListValue* args) {
#endif
gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const {
- return web_ui_->tab_contents()->view()->GetTopLevelNativeWindow();
+ return web_ui_->tab_contents()->GetView()->GetTopLevelNativeWindow();
}
diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.cc b/chrome/browser/ui/webui/options/extension_settings_handler.cc
index bf3c673..4288b8d 100644
--- a/chrome/browser/ui/webui/options/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/extension_settings_handler.cc
@@ -482,7 +482,7 @@ void ExtensionSettingsHandler::HandleSelectFilePathMessage(
load_extension_dialog_ = SelectFileDialog::Create(this);
load_extension_dialog_->SelectFile(type, select_title, FilePath(), &info,
file_type_index, FILE_PATH_LITERAL(""), web_ui_->tab_contents(),
- web_ui_->tab_contents()->view()->GetTopLevelNativeWindow(), NULL);
+ web_ui_->tab_contents()->GetView()->GetTopLevelNativeWindow(), NULL);
}
diff --git a/chrome/browser/ui/webui/options2/advanced_options_handler.cc b/chrome/browser/ui/webui/options2/advanced_options_handler.cc
index d62f553..2839021 100644
--- a/chrome/browser/ui/webui/options2/advanced_options_handler.cc
+++ b/chrome/browser/ui/webui/options2/advanced_options_handler.cc
@@ -352,7 +352,7 @@ void AdvancedOptionsHandler::HandleSelectDownloadLocation(
l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE),
pref_service->GetFilePath(prefs::kDownloadDefaultDirectory),
NULL, 0, FILE_PATH_LITERAL(""), web_ui_->tab_contents(),
- web_ui_->tab_contents()->view()->GetTopLevelNativeWindow(), NULL);
+ web_ui_->tab_contents()->GetView()->GetTopLevelNativeWindow(), NULL);
}
void AdvancedOptionsHandler::FileSelected(const FilePath& path, int index,
diff --git a/chrome/browser/ui/webui/options2/advanced_options_utils_win.cc b/chrome/browser/ui/webui/options2/advanced_options_utils_win.cc
index 5942ff9..fe84306 100644
--- a/chrome/browser/ui/webui/options2/advanced_options_utils_win.cc
+++ b/chrome/browser/ui/webui/options2/advanced_options_utils_win.cc
@@ -62,7 +62,7 @@ void AdvancedOptionsUtilities::ShowManageSSLCertificates(
#if defined(USE_AURA)
NULL;
#else
- tab_contents->view()->GetTopLevelNativeWindow();
+ tab_contents->GetView()->GetTopLevelNativeWindow();
#endif
::CryptUIDlgCertMgr(&cert_mgr);
}
diff --git a/chrome/browser/ui/webui/options2/certificate_manager_handler.cc b/chrome/browser/ui/webui/options2/certificate_manager_handler.cc
index 00d52f6..95ebdb7 100644
--- a/chrome/browser/ui/webui/options2/certificate_manager_handler.cc
+++ b/chrome/browser/ui/webui/options2/certificate_manager_handler.cc
@@ -1042,5 +1042,5 @@ void CertificateManagerHandler::CheckTpmTokenReady(const ListValue* args) {
#endif
gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const {
- return web_ui_->tab_contents()->view()->GetTopLevelNativeWindow();
+ return web_ui_->tab_contents()->GetView()->GetTopLevelNativeWindow();
}
diff --git a/chrome/browser/ui/webui/tracing_ui.cc b/chrome/browser/ui/webui/tracing_ui.cc
index ab81f84..5c83c0d 100644
--- a/chrome/browser/ui/webui/tracing_ui.cc
+++ b/chrome/browser/ui/webui/tracing_ui.cc
@@ -313,7 +313,7 @@ void TracingMessageHandler::OnLoadTraceFile(const ListValue* list) {
string16(),
FilePath(),
NULL, 0, FILE_PATH_LITERAL(""), web_ui_->tab_contents(),
- web_ui_->tab_contents()->view()->GetTopLevelNativeWindow(), NULL);
+ web_ui_->tab_contents()->GetView()->GetTopLevelNativeWindow(), NULL);
}
void TracingMessageHandler::LoadTraceFileComplete(std::string* file_contents) {
@@ -344,7 +344,7 @@ void TracingMessageHandler::OnSaveTraceFile(const ListValue* list) {
string16(),
FilePath(),
NULL, 0, FILE_PATH_LITERAL(""), web_ui_->tab_contents(),
- web_ui_->tab_contents()->view()->GetTopLevelNativeWindow(), NULL);
+ web_ui_->tab_contents()->GetView()->GetTopLevelNativeWindow(), NULL);
}
void TracingMessageHandler::SaveTraceFileComplete() {
diff --git a/content/browser/tab_contents/interstitial_page.cc b/content/browser/tab_contents/interstitial_page.cc
index f4a20c0..542165f 100644
--- a/content/browser/tab_contents/interstitial_page.cc
+++ b/content/browser/tab_contents/interstitial_page.cc
@@ -406,7 +406,7 @@ RenderViewHost* InterstitialPage::CreateRenderViewHost() {
}
TabContentsView* InterstitialPage::CreateTabContentsView() {
- TabContentsView* tab_contents_view = tab()->view();
+ TabContentsView* tab_contents_view = tab()->GetView();
RenderWidgetHostView* view =
tab_contents_view->CreateViewForWidget(render_view_host_);
render_view_host_->SetView(view);
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index f83a79b..522dbed 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -224,7 +224,7 @@ TabContents::TabContents(content::BrowserContext* browser_context,
// We have the initial size of the view be based on the size of the passed in
// tab contents (normally a tab from the same window).
view_->CreateView(base_tab_contents ?
- base_tab_contents->view()->GetContainerSize() : gfx::Size());
+ base_tab_contents->GetView()->GetContainerSize() : gfx::Size());
#if defined(ENABLE_JAVA_BRIDGE)
java_bridge_dispatcher_host_manager_.reset(
@@ -1446,6 +1446,14 @@ RenderViewHost* TabContents::GetRenderViewHost() const {
return render_manager_.current_host();
}
+RenderWidgetHostView* TabContents::GetRenderWidgetHostView() const {
+ return render_manager_.GetRenderWidgetHostView();
+}
+
+TabContentsView* TabContents::GetView() const {
+ return view_.get();
+}
+
RenderViewHostDelegate::View* TabContents::GetViewDelegate() {
return view_.get();
}
@@ -1488,7 +1496,7 @@ void TabContents::RenderViewCreated(RenderViewHost* render_view_host) {
new ViewMsg_EnableViewSourceMode(render_view_host->routing_id()));
}
- view()->RenderViewCreated(render_view_host);
+ GetView()->RenderViewCreated(render_view_host);
FOR_EACH_OBSERVER(
TabContentsObserver, observers_, RenderViewCreated(render_view_host));
@@ -1526,7 +1534,7 @@ void TabContents::RenderViewGone(RenderViewHost* rvh,
SetIsLoading(false, NULL);
NotifyDisconnected();
SetIsCrashed(status, error_code);
- view()->OnTabCrashed(crashed_status(), crashed_error_code());
+ GetView()->OnTabCrashed(crashed_status(), crashed_error_code());
FOR_EACH_OBSERVER(TabContentsObserver,
observers_,
@@ -1671,15 +1679,15 @@ void TabContents::Close(RenderViewHost* rvh) {
// TODO(shess): This could get more fine-grained. For instance,
// closing a tab in another window while selecting text in the
// current window's Omnibox should be just fine.
- if (view()->IsEventTracking()) {
- view()->CloseTabAfterEventTracking();
+ if (GetView()->IsEventTracking()) {
+ GetView()->CloseTabAfterEventTracking();
return;
}
// If we close the tab while we're in the middle of a drag, we'll crash.
// Instead, cancel the drag and close it as soon as the drag ends.
- if (view()->IsDoingDrag()) {
- view()->CancelDragAndCloseTab();
+ if (GetView()->IsDoingDrag()) {
+ GetView()->CancelDragAndCloseTab();
return;
}
@@ -2085,10 +2093,10 @@ void TabContents::set_encoding(const std::string& encoding) {
}
void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
- RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
+ RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh);
// Can be NULL during tests.
if (rwh_view)
- rwh_view->SetSize(view()->GetContainerSize());
+ rwh_view->SetSize(GetView()->GetContainerSize());
}
bool TabContents::GotResponseToLockMouseRequest(bool allowed) {
diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h
index cdbf8c6..82963a5 100644
--- a/content/browser/tab_contents/tab_contents.h
+++ b/content/browser/tab_contents/tab_contents.h
@@ -108,17 +108,6 @@ class CONTENT_EXPORT TabContents : public content::WebContents,
: render_manager_.pending_web_ui();
}
- // Returns the currently active RenderWidgetHostView. This may change over
- // time and can be NULL (during setup and teardown).
- RenderWidgetHostView* GetRenderWidgetHostView() const {
- return render_manager_.GetRenderWidgetHostView();
- }
-
- // The TabContentsView will never change and is guaranteed non-NULL.
- TabContentsView* view() const {
- return view_.get();
- }
-
// Tab navigation state ------------------------------------------------------
// Returns the current navigation properties, which if a navigation is
@@ -470,6 +459,9 @@ class CONTENT_EXPORT TabContents : public content::WebContents,
virtual void SetViewType(content::ViewType type) OVERRIDE;
virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE;
virtual RenderViewHost* GetRenderViewHost() const OVERRIDE;
+ // TODO(jam): webui stuff goes here
+ virtual RenderWidgetHostView* GetRenderWidgetHostView() const OVERRIDE;
+ virtual TabContentsView* GetView() const OVERRIDE;
// RenderViewHostDelegate ----------------------------------------------------
diff --git a/content/browser/tab_contents/tab_contents_view_win.cc b/content/browser/tab_contents/tab_contents_view_win.cc
index 296bf69..6ff4c53 100644
--- a/content/browser/tab_contents/tab_contents_view_win.cc
+++ b/content/browser/tab_contents/tab_contents_view_win.cc
@@ -163,7 +163,7 @@ void TabContentsViewWin::CreateNewWindow(
TabContents* tab = delegate_->CreateNewWindow(this, route_id, params);
// Copy logic from RenderViewHostDelegateViewHelper.
- TabContentsView* new_view = tab->view();
+ TabContentsView* new_view = tab->GetView();
new_view->CreateViewForWidget(tab->GetRenderViewHost());
pending_contents_[route_id] = tab->GetRenderViewHost();
}
diff --git a/content/browser/tab_contents/web_drag_source_gtk.cc b/content/browser/tab_contents/web_drag_source_gtk.cc
index 43dbbb92..63f1c3f 100644
--- a/content/browser/tab_contents/web_drag_source_gtk.cc
+++ b/content/browser/tab_contents/web_drag_source_gtk.cc
@@ -381,7 +381,7 @@ void WebDragSourceGtk::OnDragEnd(GtkWidget* sender,
}
gfx::NativeView WebDragSourceGtk::GetContentNativeView() const {
- return tab_contents_->view()->GetContentNativeView();
+ return tab_contents_->GetView()->GetContentNativeView();
}
gboolean WebDragSourceGtk::OnDragIconExpose(GtkWidget* sender,
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 3243054..e37458c 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -11,6 +11,10 @@
class NavigationController;
class RenderViewHost;
+class RenderWidgetHostView;
+// TODO(jam): of course we will have to rename TabContentsView etc to use
+// WebContents.
+class TabContentsView;
namespace base {
class PropertyBag;
@@ -19,8 +23,6 @@ class PropertyBag;
namespace content {
class RenderProcessHost;
-// TODO(jam): of course we will have to rename TabContentsView etc to use
-// WebPage.
class WebContentsDelegate;
// Describes what goes in the main content area of a tab.
@@ -51,6 +53,13 @@ class WebContents {
// Gets the current RenderViewHost for this tab.
virtual RenderViewHost* GetRenderViewHost() const = 0;
+
+ // Returns the currently active RenderWidgetHostView. This may change over
+ // time and can be NULL (during setup and teardown).
+ virtual RenderWidgetHostView* GetRenderWidgetHostView() const = 0;
+
+ // The TabContentsView will never change and is guaranteed non-NULL.
+ virtual TabContentsView* GetView() const = 0;
};
} // namespace content
diff --git a/content/shell/shell.cc b/content/shell/shell.cc
index 488de97..16033e6 100644
--- a/content/shell/shell.cc
+++ b/content/shell/shell.cc
@@ -62,7 +62,7 @@ Shell* Shell::CreateNewWindow(content::BrowserContext* browser_context,
#if defined(OS_WIN)
TabContentsViewWin* view =
- static_cast<TabContentsViewWin*>(shell->tab_contents_->view());
+ static_cast<TabContentsViewWin*>(shell->tab_contents_->GetView());
view->SetParent(shell->window_);
#endif