OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #import "base/mac/scoped_nsobject.h" | 12 #import "base/mac/scoped_nsobject.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #import "chrome/browser/ui/cocoa/has_weak_browser_pointer.h" | 13 #import "chrome/browser/ui/cocoa/has_weak_browser_pointer.h" |
13 #include "ui/gfx/geometry/size.h" | 14 #include "ui/gfx/geometry/size.h" |
14 | 15 |
15 class Browser; | 16 class Browser; |
16 @class BrowserActionButton; | 17 @class BrowserActionButton; |
17 @class BrowserActionsContainerView; | 18 @class BrowserActionsContainerView; |
18 @class MenuButton; | 19 @class MenuButton; |
19 class ToolbarActionsBar; | 20 class ToolbarActionsBar; |
20 @class ToolbarActionsBarBubbleMac; | 21 @class ToolbarActionsBarBubbleMac; |
21 class ToolbarActionsBarDelegate; | 22 class ToolbarActionsBarDelegate; |
(...skipping 14 matching lines...) Expand all Loading... |
36 Browser* browser_; | 37 Browser* browser_; |
37 | 38 |
38 // The view from Toolbar.xib we'll be rendering our browser actions in. Weak. | 39 // The view from Toolbar.xib we'll be rendering our browser actions in. Weak. |
39 BrowserActionsContainerView* containerView_; | 40 BrowserActionsContainerView* containerView_; |
40 | 41 |
41 // Array of toolbar action buttons in the correct order for them to be | 42 // Array of toolbar action buttons in the correct order for them to be |
42 // displayed (includes both hidden and visible buttons). | 43 // displayed (includes both hidden and visible buttons). |
43 base::scoped_nsobject<NSMutableArray> buttons_; | 44 base::scoped_nsobject<NSMutableArray> buttons_; |
44 | 45 |
45 // The delegate for the ToolbarActionsBar. | 46 // The delegate for the ToolbarActionsBar. |
46 scoped_ptr<ToolbarActionsBarDelegate> toolbarActionsBarBridge_; | 47 std::unique_ptr<ToolbarActionsBarDelegate> toolbarActionsBarBridge_; |
47 | 48 |
48 // The controlling ToolbarActionsBar. | 49 // The controlling ToolbarActionsBar. |
49 scoped_ptr<ToolbarActionsBar> toolbarActionsBar_; | 50 std::unique_ptr<ToolbarActionsBar> toolbarActionsBar_; |
50 | 51 |
51 // True if we should supppress the chevron (we do this during drag | 52 // True if we should supppress the chevron (we do this during drag |
52 // animations). | 53 // animations). |
53 BOOL suppressChevron_; | 54 BOOL suppressChevron_; |
54 | 55 |
55 // True if this is the overflow container for toolbar actions. | 56 // True if this is the overflow container for toolbar actions. |
56 BOOL isOverflow_; | 57 BOOL isOverflow_; |
57 | 58 |
58 // The currently running chevron animation (fade in/out). | 59 // The currently running chevron animation (fade in/out). |
59 base::scoped_nsobject<NSViewAnimation> chevronAnimation_; | 60 base::scoped_nsobject<NSViewAnimation> chevronAnimation_; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // Returns the size for the provided |maxWidth| of the overflow menu. | 126 // Returns the size for the provided |maxWidth| of the overflow menu. |
126 - (gfx::Size)sizeForOverflowWidth:(int)maxWidth; | 127 - (gfx::Size)sizeForOverflowWidth:(int)maxWidth; |
127 | 128 |
128 @end // @interface BrowserActionsController | 129 @end // @interface BrowserActionsController |
129 | 130 |
130 @interface BrowserActionsController(TestingAPI) | 131 @interface BrowserActionsController(TestingAPI) |
131 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index; | 132 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index; |
132 @end | 133 @end |
133 | 134 |
134 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ | 135 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ |
OLD | NEW |