OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ |
| 6 #define UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ |
| 7 |
| 8 #import <Cocoa/Cocoa.h> |
| 9 |
| 10 namespace views { |
| 11 class View; |
| 12 } |
| 13 |
| 14 // The NSView that sits as the root contentView of the NSWindow, whilst it has |
| 15 // a views::RootView present. Bridges requests from Cocoa to the hosted |
| 16 // views::View. |
| 17 @interface BridgedContentView : NSView { |
| 18 @private |
| 19 // Weak. The hosted RootView, owned by hostedView_->GetWidget(). |
| 20 views::View* hostedView_; |
| 21 } |
| 22 |
| 23 @property(readonly, nonatomic) views::View* hostedView; |
| 24 |
| 25 // Initialize the NSView -> views::View bridge. |viewToHost| must be non-NULL. |
| 26 - (id)initWithView:(views::View*)viewToHost; |
| 27 |
| 28 // Clear the hosted view. For example, if it is about to be destroyed. |
| 29 - (void)clearView; |
| 30 |
| 31 @end |
| 32 |
| 33 #endif // UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ |
OLD | NEW |