Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Side by Side Diff: ui/views/cocoa/bridged_content_view.h

Issue 1146873002: [MacViews] Enable dragging a window by its caption/draggable areas. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/base/ui_base.gyp ('k') | ui/views/cocoa/bridged_content_view.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // Extends an atomic, readonly property on NSView to make it assignable.
52 // This usually returns YES if the view is transparent. We want to control it
53 // so that BridgedNativeWidget can dynamically enable dragging of the window.
54 @property(assign) BOOL mouseDownCanMoveWindow;
55
48 // Initialize the NSView -> views::View bridge. |viewToHost| must be non-NULL. 56 // Initialize the NSView -> views::View bridge. |viewToHost| must be non-NULL.
49 - (id)initWithView:(views::View*)viewToHost; 57 - (id)initWithView:(views::View*)viewToHost;
50 58
51 // Clear the hosted view. For example, if it is about to be destroyed. 59 // Clear the hosted view. For example, if it is about to be destroyed.
52 - (void)clearView; 60 - (void)clearView;
53 61
54 // Process a mouse event captured while the widget had global mouse capture. 62 // Process a mouse event captured while the widget had global mouse capture.
55 - (void)processCapturedMouseEvent:(NSEvent*)theEvent; 63 - (void)processCapturedMouseEvent:(NSEvent*)theEvent;
56 64
57 // Mac's version of views::corewm::TooltipController::UpdateIfRequired(). 65 // Mac's version of views::corewm::TooltipController::UpdateIfRequired().
58 // Updates the tooltip on the ToolTipBaseView if the text needs to change. 66 // 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 67 // |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. 68 // contentRect (also this NSView's frame), as given by a ui::LocatedEvent.
61 - (void)updateTooltipIfRequiredAt:(const gfx::Point&)locationInContent; 69 - (void)updateTooltipIfRequiredAt:(const gfx::Point&)locationInContent;
62 70
63 @end 71 @end
64 72
65 #endif // UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ 73 #endif // UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_
OLDNEW
« no previous file with comments | « ui/base/ui_base.gyp ('k') | ui/views/cocoa/bridged_content_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698