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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 void DestroyCompositor(); | 194 void DestroyCompositor(); |
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|. |
| 205 // Otherwise, asks ui::WindowResizeHelperMac to run tasks until a matching |
| 206 // frame is ready, or a timeout occurs. |
| 207 void MaybeWaitForFrame(const gfx::Size& size_in_dip); |
| 208 |
204 // Sets mouseDownCanMoveWindow on |bridged_view_| and triggers the NSWindow to | 209 // Sets mouseDownCanMoveWindow on |bridged_view_| and triggers the NSWindow to |
205 // update its draggable region. | 210 // update its draggable region. |
206 void SetDraggable(bool draggable); | 211 void SetDraggable(bool draggable); |
207 | 212 |
208 // Overridden from CocoaMouseCaptureDelegate: | 213 // Overridden from CocoaMouseCaptureDelegate: |
209 void PostCapturedEvent(NSEvent* event) override; | 214 void PostCapturedEvent(NSEvent* event) override; |
210 void OnMouseCaptureLost() override; | 215 void OnMouseCaptureLost() override; |
211 | 216 |
212 // Returns a properties dictionary associated with the NSWindow. | 217 // Returns a properties dictionary associated with the NSWindow. |
213 // Creates and attaches a new instance if not found. | 218 // Creates and attaches a new instance if not found. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 // 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 |
282 // 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. |
283 bool invalidate_shadow_on_frame_swap_ = false; | 288 bool invalidate_shadow_on_frame_swap_ = false; |
284 | 289 |
285 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); | 290 DISALLOW_COPY_AND_ASSIGN(BridgedNativeWidget); |
286 }; | 291 }; |
287 | 292 |
288 } // namespace views | 293 } // namespace views |
289 | 294 |
290 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ | 295 #endif // UI_VIEWS_COCOA_BRIDGED_NATIVE_WIDGET_H_ |
OLD | NEW |