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

Unified Diff: chrome/browser/ui/panels/panel_window_controller_cocoa.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/panels/panel_window_controller_cocoa.mm
===================================================================
--- chrome/browser/ui/panels/panel_window_controller_cocoa.mm (revision 116244)
+++ chrome/browser/ui/panels/panel_window_controller_cocoa.mm (working copy)
@@ -40,6 +40,8 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/mac/nsimage_cache.h"
+using content::WebContents;
+
const int kMinimumWindowSize = 1;
const double kBoundsAnimationSpeedPixelsPerSecond = 1000;
const double kBoundsAnimationMaxDurationSeconds = 0.18;
@@ -182,10 +184,10 @@
// we always deactivate the controls here. If we're created as an active
// panel, we'll get a NSWindowDidBecomeKeyNotification and reactivate the web
// view properly. See crbug.com/97831 for more details.
- TabContents* tab_contents = [contentsController_ tabContents];
+ WebContents* web_contents = [contentsController_ webContents];
// RWHV may be NULL in unit tests.
- if (tab_contents && tab_contents->GetRenderWidgetHostView())
- tab_contents->GetRenderWidgetHostView()->SetActive(false);
+ if (web_contents && web_contents->GetRenderWidgetHostView())
+ web_contents->GetRenderWidgetHostView()->SetActive(false);
[window setFrame:frame display:YES animate:YES];
[self enableTabContentsViewAutosizing];
@@ -249,14 +251,14 @@
[findBarCocoaController positionFindBarViewAtMaxY:maxY maxWidth:maxWidth];
}
-- (void)tabInserted:(TabContents*)contents {
- [contentsController_ changeTabContents:contents];
+- (void)tabInserted:(WebContents*)contents {
+ [contentsController_ changeWebContents:contents];
DCHECK(![[contentsController_ view] isHidden]);
}
-- (void)tabDetached:(TabContents*)contents {
- DCHECK(contents == [contentsController_ tabContents]);
- [contentsController_ changeTabContents:NULL];
+- (void)tabDetached:(WebContents*)contents {
+ DCHECK(contents == [contentsController_ webContents]);
+ [contentsController_ changeWebContents:NULL];
[[contentsController_ view] setHidden:YES];
}
@@ -541,7 +543,7 @@
// We need to activate the controls (in the "WebView"). To do this, get the
// selected TabContents's RenderWidgetHostViewMac and tell it to activate.
- if (TabContents* contents = [contentsController_ tabContents]) {
+ if (WebContents* contents = [contentsController_ webContents]) {
if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView())
rwhv->SetActive(true);
}
@@ -569,7 +571,7 @@
// We need to deactivate the controls (in the "WebView"). To do this, get the
// selected TabContents's RenderWidgetHostView and tell it to deactivate.
- if (TabContents* contents = [contentsController_ tabContents]) {
+ if (WebContents* contents = [contentsController_ webContents]) {
if (RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView())
rwhv->SetActive(false);
}
« no previous file with comments | « chrome/browser/ui/panels/panel_window_controller_cocoa.h ('k') | chrome/browser/ui/toolbar/toolbar_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698