summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/tab_contents
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/cocoa/tab_contents')
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm9
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm8
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller_browsertest.mm7
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm8
4 files changed, 18 insertions, 14 deletions
diff --git a/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm b/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
index c0cc6ce..858108f 100644
--- a/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm
@@ -10,6 +10,7 @@
#include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_view.h"
ChromeWebContentsViewDelegateMac::ChromeWebContentsViewDelegateMac(
content::WebContents* web_contents)
@@ -47,10 +48,10 @@ void ChromeWebContentsViewDelegateMac::ShowContextMenu(
if (widget_view && widget_view->IsShowingContextMenu())
return;
- context_menu_.reset(
- new RenderViewContextMenuMac(web_contents_,
- params,
- web_contents_->GetContentNativeView()));
+ context_menu_.reset(new RenderViewContextMenuMac(
+ web_contents_,
+ params,
+ web_contents_->GetView()->GetContentNativeView()));
context_menu_->Init();
}
diff --git a/chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm
index c5fba22..7cae329 100644
--- a/chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm
@@ -70,7 +70,7 @@
// Remove any old preview contents before showing the new one.
if (previewContents_) {
- [previewContents_->GetNativeView() removeFromSuperview];
+ [previewContents_->GetView()->GetNativeView() removeFromSuperview];
previewContents_->WasHidden();
}
@@ -83,7 +83,7 @@
if (previewContents_) {
[[[self view] window] disableScreenUpdatesUntilFlush];
previewContents_->GetView()->SetAllowOverlappingViews(true);
- [[self view] addSubview:previewContents_->GetNativeView()];
+ [[self view] addSubview:previewContents_->GetView()->GetNativeView()];
}
if (drawDropShadow_) {
@@ -106,7 +106,7 @@
- (void)onActivateTabWithContents:(content::WebContents*)contents {
if (previewContents_ == contents) {
if (previewContents_) {
- [previewContents_->GetNativeView() removeFromSuperview];
+ [previewContents_->GetView()->GetNativeView() removeFromSuperview];
previewContents_ = NULL;
}
[self setPreview:NULL
@@ -151,7 +151,7 @@
NSRect previewFrame = bounds;
previewFrame.size.height = [self previewHeightInPixels];
previewFrame.origin.y = NSMaxY(bounds) - NSHeight(previewFrame);
- [previewContents_->GetNativeView() setFrame:previewFrame];
+ [previewContents_->GetView()->GetNativeView() setFrame:previewFrame];
if (dropShadowView_) {
NSRect dropShadowFrame = bounds;
diff --git a/chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller_browsertest.mm b/chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller_browsertest.mm
index 9063d75..7273d96 100644
--- a/chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller_browsertest.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller_browsertest.mm
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/cocoa/tab_contents/preview_drop_shadow_view.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_view.h"
#import "testing/gtest_mac.h"
class PreviewableContentsControllerTest : public InProcessBrowserTest {
@@ -43,7 +44,7 @@ class PreviewableContentsControllerTest : public InProcessBrowserTest {
InstantSizeUnits units) {
NSRect container_bounds = [[controller_ view] bounds];
NSRect preview_frame =
- [web_contents_->GetNativeView() frame];
+ [web_contents_->GetView()->GetNativeView() frame];
EXPECT_EQ(NSMinX(container_bounds), NSMinX(preview_frame));
EXPECT_EQ(NSWidth(container_bounds), NSWidth(preview_frame));
@@ -73,7 +74,7 @@ IN_PROC_BROWSER_TEST_F(PreviewableContentsControllerTest, SizePerecent) {
InstantSizeUnits units = INSTANT_SIZE_PERCENT;
instant_model_.SetPreviewState(mode, expected_height, units);
- EXPECT_NSEQ([web_contents_->GetNativeView() superview],
+ EXPECT_NSEQ([web_contents_->GetView()->GetNativeView() superview],
[controller_ view]);
VerifyPreviewFrame(expected_height, units);
@@ -90,7 +91,7 @@ IN_PROC_BROWSER_TEST_F(PreviewableContentsControllerTest, SizePixels) {
InstantSizeUnits units = INSTANT_SIZE_PIXELS;
instant_model_.SetPreviewState(mode, expected_height, units);
- EXPECT_NSEQ([web_contents_->GetNativeView() superview],
+ EXPECT_NSEQ([web_contents_->GetView()->GetNativeView() superview],
[controller_ view]);
VerifyPreviewFrame(expected_height, units);
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 d4a7f3f..1622bb6 100644
--- a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
@@ -40,8 +40,10 @@ using content::WebContents;
- (void)ensureContentsSizeDoesNotChange {
NSView* contentsContainer = [self view];
NSArray* subviews = [contentsContainer subviews];
- if ([subviews count] > 0)
- [contents_->GetNativeView() setAutoresizingMask:NSViewNotSizable];
+ if ([subviews count] > 0) {
+ [contents_->GetView()->GetNativeView()
+ setAutoresizingMask:NSViewNotSizable];
+ }
}
// Call when the tab view is properly sized and the render widget host view
@@ -51,7 +53,7 @@ using content::WebContents;
return;
NSView* contentsContainer = [self view];
NSArray* subviews = [contentsContainer subviews];
- NSView* contentsNativeView = contents_->GetNativeView();
+ NSView* contentsNativeView = contents_->GetView()->GetNativeView();
[contentsNativeView setFrame:[contentsContainer frame]];
if ([subviews count] == 0) {
[contentsContainer addSubview:contentsNativeView];