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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm

Issue 995983002: Make LoadMonitoringExtensionHostQueue remove itself as an ExtensionHost observer at the correct tim… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: roll back some stuff Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h" 5 #import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // the notification is fired (and consequently the view contents have loaded). 374 // the notification is fired (and consequently the view contents have loaded).
375 if (![window isVisible]) { 375 if (![window isVisible]) {
376 [self showWindow:self]; 376 [self showWindow:self];
377 } 377 }
378 } 378 }
379 379
380 - (void)onSizeChanged:(NSSize)newSize { 380 - (void)onSizeChanged:(NSSize)newSize {
381 // When we update the size, the window will become visible. Stay hidden until 381 // When we update the size, the window will become visible. Stay hidden until
382 // the host is loaded. 382 // the host is loaded.
383 pendingSize_ = newSize; 383 pendingSize_ = newSize;
384 if (!host_ || !host_->did_stop_loading()) 384 if (!host_ || !host_->has_loaded_once())
385 return; 385 return;
386 386
387 // No need to use CA here, our caller calls us repeatedly to animate the 387 // No need to use CA here, our caller calls us repeatedly to animate the
388 // resizing. 388 // resizing.
389 NSRect frame = [extensionView_ frame]; 389 NSRect frame = [extensionView_ frame];
390 frame.size = newSize; 390 frame.size = newSize;
391 391
392 // |new_size| is in pixels. Convert to view units. 392 // |new_size| is in pixels. Convert to view units.
393 frame.size = [extensionView_ convertSize:frame.size fromView:nil]; 393 frame.size = [extensionView_ convertSize:frame.size fromView:nil];
394 394
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 return minSize; 432 return minSize;
433 } 433 }
434 434
435 // Private (TestingAPI) 435 // Private (TestingAPI)
436 + (NSSize)maxPopupSize { 436 + (NSSize)maxPopupSize {
437 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight}; 437 NSSize maxSize = {ExtensionViewMac::kMaxWidth, ExtensionViewMac::kMaxHeight};
438 return maxSize; 438 return maxSize;
439 } 439 }
440 440
441 @end 441 @end
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_view_host.cc ('k') | chrome/browser/ui/cocoa/extensions/extension_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698