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

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: Fixed nits in test. 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
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 987b3130b06a7473c606d55d42c98528f183b814..23f8a8af9ee4b7357a99b68203f278b0aa2ad792 100644
--- a/ui/views/cocoa/bridged_native_widget.mm
+++ b/ui/views/cocoa/bridged_native_widget.mm
@@ -738,14 +738,11 @@ void BridgedNativeWidget::OnSizeChanged() {
}
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)

Powered by Google App Engine
This is Rietveld 408576698