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

Unified Diff: ui/views/cocoa/bridged_native_widget.mm

Issue 2069103004: MacViews: Attach child windows when parent is on the screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable test as potentialy flacky. Created 4 years, 6 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 | « ui/views/cocoa/bridged_native_widget.h ('k') | ui/views/cocoa/native_widget_mac_nswindow.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/bridged_native_widget.mm
diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm
index 830cfcdd6ed3a6fdcb6a9af2d6d52e82529ed4b8..16af930118c3a8fdb3e9b673893bcc1a3b7512ef 100644
--- a/ui/views/cocoa/bridged_native_widget.mm
+++ b/ui/views/cocoa/bridged_native_widget.mm
@@ -784,14 +784,11 @@ void BridgedNativeWidget::OnPositionChanged() {
}
void BridgedNativeWidget::OnVisibilityChanged() {
- OnVisibilityChangedTo([window_ isVisible]);
-}
-
-void BridgedNativeWidget::OnVisibilityChangedTo(bool new_visibility) {
- if (window_visible_ == new_visibility)
+ const bool window_visible = [window_ isVisible];
+ if (window_visible_ == window_visible)
return;
- window_visible_ = new_visibility;
+ window_visible_ = window_visible;
// If arriving via SetVisible(), |wants_to_be_visible_| should already be set.
// If made visible externally (e.g. Cmd+H), just roll with it. Don't try (yet)
« no previous file with comments | « ui/views/cocoa/bridged_native_widget.h ('k') | ui/views/cocoa/native_widget_mac_nswindow.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698