| OLD | NEW |
| 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 <vector> | 10 #include <vector> |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // frame is ready, or a timeout occurs. | 208 // frame is ready, or a timeout occurs. |
| 209 void MaybeWaitForFrame(const gfx::Size& size_in_dip); | 209 void MaybeWaitForFrame(const gfx::Size& size_in_dip); |
| 210 | 210 |
| 211 // Show the window using -[NSApp beginSheet:..], modal for the parent window. | 211 // Show the window using -[NSApp beginSheet:..], modal for the parent window. |
| 212 void ShowAsModalSheet(); | 212 void ShowAsModalSheet(); |
| 213 | 213 |
| 214 // Sets mouseDownCanMoveWindow on |bridged_view_| and triggers the NSWindow to | 214 // Sets mouseDownCanMoveWindow on |bridged_view_| and triggers the NSWindow to |
| 215 // update its draggable region. | 215 // update its draggable region. |
| 216 void SetDraggable(bool draggable); | 216 void SetDraggable(bool draggable); |
| 217 | 217 |
| 218 // For non-rectangular windows, updates the path corresponding to the mask of |
| 219 // |compositor_superview_|'s layer. If a mask layer does not yet exist, it |
| 220 // creates a new one. |
| 221 void UpdateMaskPath(); |
| 222 |
| 218 // Overridden from CocoaMouseCaptureDelegate: | 223 // Overridden from CocoaMouseCaptureDelegate: |
| 219 void PostCapturedEvent(NSEvent* event) override; | 224 void PostCapturedEvent(NSEvent* event) override; |
| 220 void OnMouseCaptureLost() override; | 225 void OnMouseCaptureLost() override; |
| 221 | 226 |
| 222 // Returns a properties dictionary associated with the NSWindow. | 227 // Returns a properties dictionary associated with the NSWindow. |
| 223 // Creates and attaches a new instance if not found. | 228 // Creates and attaches a new instance if not found. |
| 224 NSMutableDictionary* GetWindowProperties() const; | 229 NSMutableDictionary* GetWindowProperties() const; |
| 225 | 230 |
| 226 // Overridden from FocusChangeListener: | 231 // Overridden from FocusChangeListener: |
| 227 void OnWillChangeFocus(View* focused_before, | 232 void OnWillChangeFocus(View* focused_before, |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 // If true, the window has been made visible or changed shape and the window | 293 // If true, the window has been made visible or changed shape and the window |
| 289 // shadow needs to be invalidated when a frame is received for the new shape. | 294 // shadow needs to be invalidated when a frame is received for the new shape. |
| 290 bool invalidate_shadow_on_frame_swap_ = false; | 295 bool invalidate_shadow_on_frame_swap_ = false; |
| 291 | 296 |
| 292 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); | 297 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); |
| 293 }; | 298 }; |
| 294 | 299 |
| 295 } // namespace views | 300 } // namespace views |
| 296 | 301 |
| 297 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ | 302 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ |
| OLD | NEW |