OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_COCOA_PANELS_PANEL_TITLEBAR_VIEW_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PANELS_PANEL_TITLEBAR_VIEW_COCOA_H_ |
6 #define CHROME_BROWSER_UI_COCOA_PANELS_PANEL_TITLEBAR_VIEW_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_PANELS_PANEL_TITLEBAR_VIEW_COCOA_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #import "chrome/browser/ui/cocoa/panels/mouse_drag_controller.h" | 10 #import "chrome/browser/ui/cocoa/panels/mouse_drag_controller.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 IBOutlet HoverImageButton* customCloseButton_; | 54 IBOutlet HoverImageButton* customCloseButton_; |
55 // Transparent view on top of entire titlebar. It catches mouse events to | 55 // Transparent view on top of entire titlebar. It catches mouse events to |
56 // prevent window activation by the system on mouseDown. | 56 // prevent window activation by the system on mouseDown. |
57 IBOutlet NSView* overlay_; | 57 IBOutlet NSView* overlay_; |
58 NSButton* closeButton_; // Created explicitly, not from NIB. Weak, destroyed | 58 NSButton* closeButton_; // Created explicitly, not from NIB. Weak, destroyed |
59 // when view is destroyed, as a subview. | 59 // when view is destroyed, as a subview. |
60 ui::ScopedCrTrackingArea closeButtonTrackingArea_; | 60 ui::ScopedCrTrackingArea closeButtonTrackingArea_; |
61 BOOL isDrawingAttention_; | 61 BOOL isDrawingAttention_; |
62 | 62 |
63 // "Glint" animation is used in "Draw Attention" mode. | 63 // "Glint" animation is used in "Draw Attention" mode. |
64 scoped_nsobject<RepaintAnimation> glintAnimation_; | 64 base::scoped_nsobject<RepaintAnimation> glintAnimation_; |
65 scoped_nsobject<NSTimer> glintAnimationTimer_; | 65 base::scoped_nsobject<NSTimer> glintAnimationTimer_; |
66 int glintCounter_; | 66 int glintCounter_; |
67 | 67 |
68 // Drag support. | 68 // Drag support. |
69 scoped_nsobject<MouseDragController> dragController_; | 69 base::scoped_nsobject<MouseDragController> dragController_; |
70 } | 70 } |
71 | 71 |
72 // Callbacks from Close, Minimize, and Restore buttons. | 72 // Callbacks from Close, Minimize, and Restore buttons. |
73 - (void)onCloseButtonClick:(id)sender; | 73 - (void)onCloseButtonClick:(id)sender; |
74 - (void)onMinimizeButtonClick:(id)sender; | 74 - (void)onMinimizeButtonClick:(id)sender; |
75 - (void)onRestoreButtonClick:(id)sender; | 75 - (void)onRestoreButtonClick:(id)sender; |
76 | 76 |
77 // Attaches this view to the controller_'s window as a titlebar. | 77 // Attaches this view to the controller_'s window as a titlebar. |
78 - (void)attach; | 78 - (void)attach; |
79 | 79 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 - (void)pressLeftMouseButtonTitlebar:(NSPoint)mouseLocation | 122 - (void)pressLeftMouseButtonTitlebar:(NSPoint)mouseLocation |
123 modifiers:(int)modifierFlags; | 123 modifiers:(int)modifierFlags; |
124 - (void)releaseLeftMouseButtonTitlebar:(int)modifierFlags; | 124 - (void)releaseLeftMouseButtonTitlebar:(int)modifierFlags; |
125 - (void)dragTitlebar:(NSPoint)mouseLocation; | 125 - (void)dragTitlebar:(NSPoint)mouseLocation; |
126 - (void)cancelDragTitlebar; | 126 - (void)cancelDragTitlebar; |
127 - (void)finishDragTitlebar; | 127 - (void)finishDragTitlebar; |
128 | 128 |
129 @end // @interface PanelTitlebarViewCocoa(TestingAPI) | 129 @end // @interface PanelTitlebarViewCocoa(TestingAPI) |
130 | 130 |
131 #endif // CHROME_BROWSER_UI_COCOA_PANELS_PANEL_TITLEBAR_VIEW_COCOA_H_ | 131 #endif // CHROME_BROWSER_UI_COCOA_PANELS_PANEL_TITLEBAR_VIEW_COCOA_H_ |
OLD | NEW |