Index: chrome/browser/renderer_host/render_widget_host_view_mac.mm |
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm |
index f8322ab0da9fab34d007b9c243e56b483b2b2919..f6f4ca430b383c116d9f14e8fcbb48dc0071097a 100644 |
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm |
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm |
@@ -619,6 +619,21 @@ void RenderWidgetHostViewMac::SetSize(const gfx::Size& size) { |
[(BaseView*)[cocoa_view_ superview] flipRectToNSRect:rect]]; |
} |
+void RenderWidgetHostViewMac::MoveTo(const gfx::Point& point) { |
+ if (is_hidden_) |
+ return; |
+ |
+ // Do conversions to upper-left origin, as "move to" means keep the |
+ // upper-left corner pinned. |
Avi (use Gerrit)
2011/01/25 22:52:07
You can't really say "pinned" here as that implies
|
+ DCHECK([[cocoa_view_ superview] isKindOfClass:[BaseView class]]); |
+ gfx::Rect rect = |
+ [(BaseView*)[cocoa_view_ superview] flipNSRectToRect:[cocoa_view_ frame]]; |
+ rect.set_x(point.x()); |
+ rect.set_y(point.y()); |
+ [cocoa_view_ setFrame: |
+ [(BaseView*)[cocoa_view_ superview] flipRectToNSRect:rect]]; |
+} |
+ |
gfx::NativeView RenderWidgetHostViewMac::GetNativeView() { |
return native_view(); |
} |