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

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

Issue 594015: Don't send frame update messages for non-browser RWHVs (Closed)
Patch Set: Created 10 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c804892e202721ebc7424786e2bff54aad798371..6e6df703f6455116e3e213acd66a149d5148de07 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -124,9 +124,9 @@ RenderWidgetHostViewMac::~RenderWidgetHostViewMac() {
void RenderWidgetHostViewMac::InitAsPopup(
RenderWidgetHostView* parent_host_view,
const gfx::Rect& pos) {
- [parent_host_view->GetNativeView() addSubview:cocoa_view_];
[cocoa_view_ setCloseOnDeactivate:YES];
[cocoa_view_ setCanBeKeyView:activatable_ ? YES : NO];
+ [parent_host_view->GetNativeView() addSubview:cocoa_view_];
rohitrao (ping after 24h) 2010/02/09 21:56:50 Why did this move?
// TODO(avi):Why the hell are these screen coordinates? The Windows code calls
// ::MoveWindow() which indicates they should be local, but when running it I
@@ -1544,11 +1544,15 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
// If we move into a new window, refresh the frame information. We don't need
// to do it if it was the same window as it used to be in, since that case
// is covered by DidBecomeSelected.
- NSWindow* newWindow = [self window];
- // Pointer comparison only, since we don't know if lastWindow_ is still valid.
- if (newWindow && (newWindow != lastWindow_)) {
- lastWindow_ = newWindow;
- renderWidgetHostView_->WindowFrameChanged();
+ // We only want to do this for real browser views, not popups.
+ if (canBeKeyView_) {
+ NSWindow* newWindow = [self window];
+ // Pointer comparison only, since we don't know if lastWindow_ is still
+ // valid.
+ if (newWindow && (newWindow != lastWindow_)) {
+ lastWindow_ = newWindow;
+ renderWidgetHostView_->WindowFrameChanged();
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698