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

Unified Diff: chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm

Issue 573143002: Mac: Give bubble windows an initial position before showing them. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: setAnchorPoint Created 6 years, 3 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 | « chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
diff --git a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
index b5dbd4ed881e35f8c51b6506d6eab33cba4f65be..5bcb0434885ba7d0fe9ef6f6a152b05f6cc7e8a5 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
@@ -403,6 +403,11 @@ class DevtoolsNotificationBridge : public content::NotificationObserver {
}
- (void)onWindowChanged {
+ // The window is positioned before creating the host, to ensure the host is
+ // created with the correct screen information.
+ if (!host_)
+ return;
+
ExtensionViewMac* extensionView =
static_cast<ExtensionViewMac*>(host_->view());
// Let the extension view know, so that it can tell plugins.
« no previous file with comments | « chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698