Chromium Code Reviews| 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 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 ui::TextInputClient* textInputClient_; | 33 ui::TextInputClient* textInputClient_; |
| 34 | 34 |
| 35 // A tracking area installed to enable mouseMoved events. | 35 // A tracking area installed to enable mouseMoved events. |
| 36 ui::ScopedCrTrackingArea cursorTrackingArea_; | 36 ui::ScopedCrTrackingArea cursorTrackingArea_; |
| 37 | 37 |
| 38 // Whether the view is reacting to a keyDown event on the view. | 38 // Whether the view is reacting to a keyDown event on the view. |
| 39 BOOL inKeyDown_; | 39 BOOL inKeyDown_; |
| 40 | 40 |
| 41 // The last tooltip text, used to limit updates. | 41 // The last tooltip text, used to limit updates. |
| 42 base::string16 lastTooltipText_; | 42 base::string16 lastTooltipText_; |
| 43 | |
| 44 // Whether dragging on the view moves the window. | |
| 45 BOOL mouseDownCanMoveWindow_; | |
| 43 } | 46 } |
| 44 | 47 |
| 45 @property(readonly, nonatomic) views::View* hostedView; | 48 @property(readonly, nonatomic) views::View* hostedView; |
| 46 @property(assign, nonatomic) ui::TextInputClient* textInputClient; | 49 @property(assign, nonatomic) ui::TextInputClient* textInputClient; |
| 47 | 50 |
| 51 // This usually returns YES if the view is transparent. We want to control it | |
| 52 // so that BridgedNativeWidget can dynamically enable dragging of the window. | |
| 53 @property(assign) BOOL mouseDownCanMoveWindow; | |
|
tapted
2015/06/03 07:04:50
nonatomic?
jackhou1
2015/06/03 08:13:52
Done.
I removed it because it wouldn't build on 1
tapted
2015/06/03 09:12:57
Ah. Interesting. I think we are trying to keep 10.
jackhou1
2015/06/03 09:32:47
Done.
| |
| 54 | |
| 48 // Initialize the NSView -> views::View bridge. |viewToHost| must be non-NULL. | 55 // Initialize the NSView -> views::View bridge. |viewToHost| must be non-NULL. |
| 49 - (id)initWithView:(views::View*)viewToHost; | 56 - (id)initWithView:(views::View*)viewToHost; |
| 50 | 57 |
| 51 // Clear the hosted view. For example, if it is about to be destroyed. | 58 // Clear the hosted view. For example, if it is about to be destroyed. |
| 52 - (void)clearView; | 59 - (void)clearView; |
| 53 | 60 |
| 54 // Process a mouse event captured while the widget had global mouse capture. | 61 // Process a mouse event captured while the widget had global mouse capture. |
| 55 - (void)processCapturedMouseEvent:(NSEvent*)theEvent; | 62 - (void)processCapturedMouseEvent:(NSEvent*)theEvent; |
| 56 | 63 |
| 57 // Mac's version of views::corewm::TooltipController::UpdateIfRequired(). | 64 // Mac's version of views::corewm::TooltipController::UpdateIfRequired(). |
| 58 // Updates the tooltip on the ToolTipBaseView if the text needs to change. | 65 // Updates the tooltip on the ToolTipBaseView if the text needs to change. |
| 59 // |locationInContent| is the position from the top left of the window's | 66 // |locationInContent| is the position from the top left of the window's |
| 60 // contentRect (also this NSView's frame), as given by a ui::LocatedEvent. | 67 // contentRect (also this NSView's frame), as given by a ui::LocatedEvent. |
| 61 - (void)updateTooltipIfRequiredAt:(const gfx::Point&)locationInContent; | 68 - (void)updateTooltipIfRequiredAt:(const gfx::Point&)locationInContent; |
| 62 | 69 |
| 63 @end | 70 @end |
| 64 | 71 |
| 65 #endif // UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ | 72 #endif // UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ |
| OLD | NEW |