| 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 // Installs the NSView for hosting the composited layer. It is later provided | 196 // Installs the NSView for hosting the composited layer. It is later provided |
| 197 // to |compositor_widget_| via AcceleratedWidgetGetNSView(). | 197 // to |compositor_widget_| via AcceleratedWidgetGetNSView(). |
| 198 void AddCompositorSuperview(); | 198 void AddCompositorSuperview(); |
| 199 | 199 |
| 200 // Size the layer to match the client area bounds, taking into account display | 200 // Size the layer to match the client area bounds, taking into account display |
| 201 // scale factor. | 201 // scale factor. |
| 202 void UpdateLayerProperties(); | 202 void UpdateLayerProperties(); |
| 203 | 203 |
| 204 // Immediately return if there is a composited frame matching |size_in_dip|. | 204 // Immediately return if there is a composited frame matching |size_in_dip|. |
| 205 // Otherwise, asks ui::WindowResizeHelperMac to run tasks until a matching | 205 // Otherwise, asks ui::WindowResizeHelper to run tasks until a matching |
| 206 // frame is ready, or a timeout occurs. | 206 // frame is ready, or a timeout occurs. |
| 207 void MaybeWaitForFrame(const gfx::Size& size_in_dip); | 207 void MaybeWaitForFrame(const gfx::Size& size_in_dip); |
| 208 | 208 |
| 209 // Show the window using -[NSApp beginSheet:..], modal for the parent window. | 209 // Show the window using -[NSApp beginSheet:..], modal for the parent window. |
| 210 void ShowAsModalSheet(); | 210 void ShowAsModalSheet(); |
| 211 | 211 |
| 212 // Sets mouseDownCanMoveWindow on |bridged_view_| and triggers the NSWindow to | 212 // Sets mouseDownCanMoveWindow on |bridged_view_| and triggers the NSWindow to |
| 213 // update its draggable region. | 213 // update its draggable region. |
| 214 void SetDraggable(bool draggable); | 214 void SetDraggable(bool draggable); |
| 215 | 215 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 // If true, the window has been made visible or changed shape and the window | 286 // If true, the window has been made visible or changed shape and the window |
| 287 // shadow needs to be invalidated when a frame is received for the new shape. | 287 // shadow needs to be invalidated when a frame is received for the new shape. |
| 288 bool invalidate_shadow_on_frame_swap_ = false; | 288 bool invalidate_shadow_on_frame_swap_ = false; |
| 289 | 289 |
| 290 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); | 290 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); |
| 291 }; | 291 }; |
| 292 | 292 |
| 293 } // namespace views | 293 } // namespace views |
| 294 | 294 |
| 295 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ | 295 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ |
| OLD | NEW |