| 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 <memory> | 10 #include <memory> |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // Show the window using -[NSApp beginSheet:..], modal for the parent window. | 234 // Show the window using -[NSApp beginSheet:..], modal for the parent window. |
| 235 void ShowAsModalSheet(); | 235 void ShowAsModalSheet(); |
| 236 | 236 |
| 237 // Sets mouseDownCanMoveWindow on |bridged_view_| and triggers the NSWindow to | 237 // Sets mouseDownCanMoveWindow on |bridged_view_| and triggers the NSWindow to |
| 238 // update its draggable region. | 238 // update its draggable region. |
| 239 void SetDraggable(bool draggable); | 239 void SetDraggable(bool draggable); |
| 240 | 240 |
| 241 // Overridden from CocoaMouseCaptureDelegate: | 241 // Overridden from CocoaMouseCaptureDelegate: |
| 242 void PostCapturedEvent(NSEvent* event) override; | 242 void PostCapturedEvent(NSEvent* event) override; |
| 243 void OnMouseCaptureLost() override; | 243 void OnMouseCaptureLost() override; |
| 244 NSWindow* GetWindow() const override; |
| 244 | 245 |
| 245 // Returns a properties dictionary associated with the NSWindow. | 246 // Returns a properties dictionary associated with the NSWindow. |
| 246 // Creates and attaches a new instance if not found. | 247 // Creates and attaches a new instance if not found. |
| 247 NSMutableDictionary* GetWindowProperties() const; | 248 NSMutableDictionary* GetWindowProperties() const; |
| 248 | 249 |
| 249 // Overridden from FocusChangeListener: | 250 // Overridden from FocusChangeListener: |
| 250 void OnWillChangeFocus(View* focused_before, | 251 void OnWillChangeFocus(View* focused_before, |
| 251 View* focused_now) override; | 252 View* focused_now) override; |
| 252 void OnDidChangeFocus(View* focused_before, | 253 void OnDidChangeFocus(View* focused_before, |
| 253 View* focused_now) override; | 254 View* focused_now) override; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 bool invalidate_shadow_on_frame_swap_ = false; | 316 bool invalidate_shadow_on_frame_swap_ = false; |
| 316 | 317 |
| 317 AssociatedViews associated_views_; | 318 AssociatedViews associated_views_; |
| 318 | 319 |
| 319 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); | 320 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); |
| 320 }; | 321 }; |
| 321 | 322 |
| 322 } // namespace views | 323 } // namespace views |
| 323 | 324 |
| 324 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ | 325 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ |
| OLD | NEW |