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_PANELS_PANEL_TITLEBAR_VIEW_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_TITLEBAR_VIEW_COCOA_H_ |
6 #define CHROME_BROWSER_UI_PANELS_PANEL_TITLEBAR_VIEW_COCOA_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_TITLEBAR_VIEW_COCOA_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #import "base/mac/cocoa_protocols.h" | 10 #import "base/mac/cocoa_protocols.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 - (void)drag:(NSPoint)mouseLocation; | 119 - (void)drag:(NSPoint)mouseLocation; |
120 | 120 |
121 // Draw Attention methods - change appearance of titlebar to attract user. | 121 // Draw Attention methods - change appearance of titlebar to attract user. |
122 - (void)drawAttention; | 122 - (void)drawAttention; |
123 - (void)stopDrawingAttention; | 123 - (void)stopDrawingAttention; |
124 - (BOOL)isDrawingAttention; | 124 - (BOOL)isDrawingAttention; |
125 - (void)startGlintAnimation; | 125 - (void)startGlintAnimation; |
126 - (void)restartGlintAnimation:(NSTimer*)timer; | 126 - (void)restartGlintAnimation:(NSTimer*)timer; |
127 - (void)stopGlintAnimation; | 127 - (void)stopGlintAnimation; |
128 | 128 |
129 // Returns width of titlebar when shown in "icon only" mode. | |
130 - (int)iconOnlyWidthInScreenCoordinates; | |
131 | |
132 @end // @interface PanelTitlebarView | 129 @end // @interface PanelTitlebarView |
133 | 130 |
134 // Methods which are either only for testing, or only public for testing. | 131 // Methods which are either only for testing, or only public for testing. |
135 @interface PanelTitlebarViewCocoa(TestingAPI) | 132 @interface PanelTitlebarViewCocoa(TestingAPI) |
136 | 133 |
137 - (PanelWindowControllerCocoa*)controller; | 134 - (PanelWindowControllerCocoa*)controller; |
138 | 135 |
139 - (NSTextField*)title; | 136 - (NSTextField*)title; |
140 - (NSButton*)closeButton; | 137 - (NSButton*)closeButton; |
141 - (NSButton*)minimizeButton; | 138 - (NSButton*)minimizeButton; |
142 - (NSButton*)restoreButton; | 139 - (NSButton*)restoreButton; |
143 | 140 |
144 // Simulates click on a close button. Used to test panel closing. | 141 // Simulates click on a close button. Used to test panel closing. |
145 - (void)simulateCloseButtonClick; | 142 - (void)simulateCloseButtonClick; |
146 | 143 |
147 // NativePanelTesting support. | 144 // NativePanelTesting support. |
148 // |mouseLocation| is in Cocoa's screen coordinates. | 145 // |mouseLocation| is in Cocoa's screen coordinates. |
149 - (void)pressLeftMouseButtonTitlebar:(NSPoint)mouseLocation | 146 - (void)pressLeftMouseButtonTitlebar:(NSPoint)mouseLocation |
150 modifiers:(int)modifierFlags; | 147 modifiers:(int)modifierFlags; |
151 - (void)releaseLeftMouseButtonTitlebar:(int)modifierFlags; | 148 - (void)releaseLeftMouseButtonTitlebar:(int)modifierFlags; |
152 - (void)dragTitlebar:(NSPoint)mouseLocation; | 149 - (void)dragTitlebar:(NSPoint)mouseLocation; |
153 - (void)cancelDragTitlebar; | 150 - (void)cancelDragTitlebar; |
154 - (void)finishDragTitlebar; | 151 - (void)finishDragTitlebar; |
155 | 152 |
156 @end // @interface PanelTitlebarViewCocoa(TestingAPI) | 153 @end // @interface PanelTitlebarViewCocoa(TestingAPI) |
157 | 154 |
158 #endif // CHROME_BROWSER_UI_PANELS_PANEL_TITLEBAR_VIEW_COCOA_H_ | 155 #endif // CHROME_BROWSER_UI_PANELS_PANEL_TITLEBAR_VIEW_COCOA_H_ |
OLD | NEW |