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

Side by Side Diff: ui/views/cocoa/bridged_native_widget.h

Issue 2375903002: Emit OnNativeWidgetDestroying() before clearing the NSWindowDelegate. (Closed)
Patch Set: Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ 5 #ifndef UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_
6 #define UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ 6 #define UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // shadow needs to be invalidated when a frame is received for the new shape. 314 // shadow needs to be invalidated when a frame is received for the new shape.
315 bool invalidate_shadow_on_frame_swap_ = false; 315 bool invalidate_shadow_on_frame_swap_ = false;
316 316
317 // Whether the window's visibility is suppressed currently. For opaque non- 317 // Whether the window's visibility is suppressed currently. For opaque non-
318 // modal windows, the window's alpha value is set to 0, till the frame from 318 // modal windows, the window's alpha value is set to 0, till the frame from
319 // the compositor arrives to avoid "blinking". 319 // the compositor arrives to avoid "blinking".
320 bool initial_visibility_suppressed_ = false; 320 bool initial_visibility_suppressed_ = false;
321 321
322 AssociatedViews associated_views_; 322 AssociatedViews associated_views_;
323 323
324 // We will set this flag to false inside OnWindowWillClose().
325 // For teardown flows (e.g. Widget::WIDGET_OWNS_NATIVE_WIDGET or
326 // Widget::CloseNow()) we needs to be invoked manually OnWindowWillClose()
327 // in destructor.
328 // But [NSWindow close] would synchronously call OnWindowWillClose() so to
329 // prevent second call in destructor we use this flag.
330 bool close_window_ = true;
331
324 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); 332 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget);
325 }; 333 };
326 334
327 } // namespace views 335 } // namespace views
328 336
329 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ 337 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698