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_CONTENT_VIEW_H_ | 5 #ifndef UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ |
6 #define UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ | 6 #define UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #import "ui/base/cocoa/tracking_area.h" | 10 #import "ui/base/cocoa/tracking_area.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 @private | 24 @private |
25 // Weak. The hosted RootView, owned by hostedView_->GetWidget(). | 25 // Weak. The hosted RootView, owned by hostedView_->GetWidget(). |
26 views::View* hostedView_; | 26 views::View* hostedView_; |
27 | 27 |
28 // Weak. If non-null the TextInputClient of the currently focused View in the | 28 // Weak. If non-null the TextInputClient of the currently focused View in the |
29 // hierarchy rooted at |hostedView_|. Owned by the focused View. | 29 // hierarchy rooted at |hostedView_|. Owned by the focused View. |
30 ui::TextInputClient* textInputClient_; | 30 ui::TextInputClient* textInputClient_; |
31 | 31 |
32 // A tracking area installed to enable mouseMoved events. | 32 // A tracking area installed to enable mouseMoved events. |
33 ui::ScopedCrTrackingArea trackingArea_; | 33 ui::ScopedCrTrackingArea trackingArea_; |
| 34 |
| 35 // Set to ignore window visibility in a subsequent call to drawRect:. Views |
| 36 // does not expect hidden windows to paint. However, when showing a window, |
| 37 // Cocoa first paints before updating visibility. |
| 38 BOOL willShow_; |
34 } | 39 } |
35 | 40 |
36 @property(readonly, nonatomic) views::View* hostedView; | 41 @property(readonly, nonatomic) views::View* hostedView; |
37 @property(assign, nonatomic) ui::TextInputClient* textInputClient; | 42 @property(assign, nonatomic) ui::TextInputClient* textInputClient; |
| 43 @property(assign, nonatomic) BOOL willShow; |
38 | 44 |
39 // Initialize the NSView -> views::View bridge. |viewToHost| must be non-NULL. | 45 // Initialize the NSView -> views::View bridge. |viewToHost| must be non-NULL. |
40 - (id)initWithView:(views::View*)viewToHost; | 46 - (id)initWithView:(views::View*)viewToHost; |
41 | 47 |
42 // Clear the hosted view. For example, if it is about to be destroyed. | 48 // Clear the hosted view. For example, if it is about to be destroyed. |
43 - (void)clearView; | 49 - (void)clearView; |
44 | 50 |
45 @end | 51 @end |
46 | 52 |
47 #endif // UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ | 53 #endif // UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ |
OLD | NEW |