Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4675)

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 9085006: Replace Browser::GetTabContentsAt with GetWebContentsAt and update all callers. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac yet again Created 8 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/browser_window_controller.mm
===================================================================
--- chrome/browser/ui/cocoa/browser_window_controller.mm (revision 116244)
+++ chrome/browser/ui/cocoa/browser_window_controller.mm (working copy)
@@ -1479,7 +1479,7 @@
// TabContentsControllerDelegate protocol.
- (void)tabContentsViewFrameWillChange:(TabContentsController*)source
frameRect:(NSRect)frameRect {
- TabContents* contents = [source tabContents];
+ WebContents* contents = [source webContents];
RenderWidgetHostView* render_widget_host_view = contents ?
contents->GetRenderWidgetHostView() : NULL;
if (!render_widget_host_view)
@@ -1518,14 +1518,15 @@
}
// TabStripControllerDelegate protocol.
-- (void)onActivateTabWithContents:(TabContents*)contents {
+- (void)onActivateTabWithContents:(WebContents*)contents {
// Update various elements that are interested in knowing the current
// TabContents.
// Update all the UI bits.
windowShim_->UpdateTitleBar();
- [sidebarController_ updateSidebarForTabContents:contents];
+ [sidebarController_ updateSidebarForTabContents:
+ static_cast<TabContents*>(contents)];
[devToolsController_ updateDevToolsForWebContents:contents
withProfile:browser_->profile()];
@@ -1546,7 +1547,7 @@
[devToolsController_ ensureContentsVisible];
}
-- (void)onReplaceTabWithContents:(TabContents*)contents {
+- (void)onReplaceTabWithContents:(WebContents*)contents {
// Simply remove the preview view if it exists; the tab strip
// controller will reinstall the view as the active view.
[previewableContentsController_ hidePreview];
@@ -1554,7 +1555,7 @@
}
- (void)onTabChanged:(TabStripModelObserver::TabChangeType)change
- withContents:(TabContents*)contents {
+ withContents:(WebContents*)contents {
// Update titles if this is the currently selected tab and if it isn't just
// the loading state which changed.
if (change != TabStripModelObserver::LOADING_ONLY)
@@ -1569,7 +1570,7 @@
[self updateBookmarkBarVisibilityWithAnimation:NO];
}
-- (void)onTabDetachedWithContents:(TabContents*)contents {
+- (void)onTabDetachedWithContents:(WebContents*)contents {
TabContentsWrapper* wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(contents);
[infoBarContainerController_ tabDetachedWithContents:wrapper];
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller.mm ('k') | chrome/browser/ui/cocoa/dev_tools_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698