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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/tab_contents_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/tab_contents/tab_contents_controller.mm
===================================================================
--- chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm (revision 116244)
+++ chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm (working copy)
@@ -20,7 +20,7 @@
@interface TabContentsController(Private)
// Forwards frame update to |delegate_| (ResizeNotificationView calls it).
- (void)tabContentsViewFrameWillChange:(NSRect)frameRect;
-// Notification from TabContents (forwarded by TabContentsNotificationBridge).
+// Notification from WebContents (forwarded by TabContentsNotificationBridge).
- (void)tabContentsRenderViewHostChanged:(RenderViewHost*)oldHost
newHost:(RenderViewHost*)newHost;
@end
@@ -100,9 +100,9 @@
@implementation TabContentsController
-@synthesize tabContents = contents_;
+@synthesize webContents = contents_;
-- (id)initWithContents:(TabContents*)contents
+- (id)initWithContents:(WebContents*)contents
delegate:(id<TabContentsControllerDelegate>)delegate {
if ((self = [super initWithNibName:nil bundle:nil])) {
contents_ = contents;
@@ -165,7 +165,7 @@
NSViewHeightSizable];
}
-- (void)changeTabContents:(TabContents*)newContents {
+- (void)changeWebContents:(WebContents*)newContents {
contents_ = newContents;
tabContentsBridge_->ChangeWebContents(contents_);
}
@@ -189,7 +189,7 @@
// 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]->GetRenderViewHost();
+ RenderViewHost* rvh = [self webContents]->GetRenderViewHost();
if (rvh && rvh->view() && rvh->view()->HasFocus())
rvh->Blur();
}
@@ -200,13 +200,13 @@
// logic will restore focus to the appropriate view.
}
-- (void)tabDidChange:(TabContents*)updatedContents {
+- (void)tabDidChange:(WebContents*)updatedContents {
// Calling setContentView: here removes any first responder status
// the view may have, so avoid changing the view hierarchy unless
// the view is different.
- if ([self tabContents] != updatedContents) {
- [self changeTabContents:updatedContents];
- if ([self tabContents])
+ if ([self webContents] != updatedContents) {
+ [self changeWebContents:updatedContents];
+ if ([self webContents])
[self ensureContentsVisible];
}
}
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h ('k') | chrome/browser/ui/cocoa/tabpose_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698