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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 11421166: Update screen rects when showing an infobar. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_guest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index fb8db750f25db301108bafa1a0d1ab8870b39ea2..ac0219043ed3e2d85cf2283974aaa46a45155d18 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -330,6 +330,12 @@ void RenderWidgetHostViewMac::InitAsPopup(
[cocoa_view_ setCloseOnDeactivate:YES];
[cocoa_view_ setCanBeKeyView:activatable ? YES : NO];
[parent_host_view->GetNativeView() addSubview:cocoa_view_];
+ NSWindow* popupWindow = [[NSWindow alloc] initWithContentRect:NSMakeRect(10,100,400,300)
jam 2012/11/30 02:12:06 testing code?
+ styleMask:NSTitledWindowMask
+ backing:NSBackingStoreBuffered
+ defer:NO];
+ [[popupWindow contentView] addSubview:cocoa_view_];
+ [popupWindow makeKeyAndOrderFront:popupWindow];
NSPoint origin_global = NSPointFromCGPoint(pos.origin().ToCGPoint());
if ([[NSScreen screens] count] > 0) {
@@ -2221,12 +2227,12 @@ void RenderWidgetHostViewMac::SetTextInputActive(bool active) {
renderWidgetHostView_->GetNativeView());
}
-- (void)setFrameSize:(NSSize)newSize {
- // NB: -[NSView setFrame:] calls through -setFrameSize:, so overriding
- // -setFrame: isn't neccessary.
- [super setFrameSize:newSize];
- if (renderWidgetHostView_->render_widget_host_)
- renderWidgetHostView_->render_widget_host_->WasResized();
+- (void)setFrame:(NSRect)frameRect {
+ [super setFrame:frameRect];
+ if (!renderWidgetHostView_->render_widget_host_)
+ return;
+ renderWidgetHostView_->render_widget_host_->SendScreenRects();
+ renderWidgetHostView_->render_widget_host_->WasResized();
}
- (void)callSetNeedsDisplayInRect {
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_guest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698