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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
OLDNEW
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_TOOLBAR_TOOLBAR_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include <memory>
11
10 #include "base/mac/scoped_nsobject.h" 12 #include "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 #import "chrome/browser/ui/cocoa/url_drop_target.h" 14 #import "chrome/browser/ui/cocoa/url_drop_target.h"
14 #import "chrome/browser/ui/cocoa/view_resizer.h" 15 #import "chrome/browser/ui/cocoa/view_resizer.h"
15 #include "components/prefs/pref_member.h" 16 #include "components/prefs/pref_member.h"
16 #import "ui/base/cocoa/tracking_area.h" 17 #import "ui/base/cocoa/tracking_area.h"
17 18
18 @class AutocompleteTextField; 19 @class AutocompleteTextField;
19 @class AutocompleteTextFieldEditor; 20 @class AutocompleteTextFieldEditor;
20 @class BackForwardMenuController; 21 @class BackForwardMenuController;
21 class Browser; 22 class Browser;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 IBOutlet ReloadButton* reloadButton_; 56 IBOutlet ReloadButton* reloadButton_;
56 IBOutlet ToolbarButton* homeButton_; 57 IBOutlet ToolbarButton* homeButton_;
57 IBOutlet MenuButton* appMenuButton_; 58 IBOutlet MenuButton* appMenuButton_;
58 IBOutlet AutocompleteTextField* locationBar_; 59 IBOutlet AutocompleteTextField* locationBar_;
59 IBOutlet BrowserActionsContainerView* browserActionsContainerView_; 60 IBOutlet BrowserActionsContainerView* browserActionsContainerView_;
60 61
61 @private 62 @private
62 CommandUpdater* commands_; // weak, one per window 63 CommandUpdater* commands_; // weak, one per window
63 Profile* profile_; // weak, one per window 64 Profile* profile_; // weak, one per window
64 Browser* browser_; // weak, one per window 65 Browser* browser_; // weak, one per window
65 scoped_ptr<ToolbarControllerInternal::CommandObserverBridge> commandObserver_; 66 std::unique_ptr<ToolbarControllerInternal::CommandObserverBridge>
66 scoped_ptr<LocationBarViewMac> locationBarView_; 67 commandObserver_;
68 std::unique_ptr<LocationBarViewMac> locationBarView_;
67 base::scoped_nsobject<AutocompleteTextFieldEditor> 69 base::scoped_nsobject<AutocompleteTextFieldEditor>
68 autocompleteTextFieldEditor_; 70 autocompleteTextFieldEditor_;
69 base::scoped_nsobject<BackForwardMenuController> backMenuController_; 71 base::scoped_nsobject<BackForwardMenuController> backMenuController_;
70 base::scoped_nsobject<BackForwardMenuController> forwardMenuController_; 72 base::scoped_nsobject<BackForwardMenuController> forwardMenuController_;
71 base::scoped_nsobject<BrowserActionsController> browserActionsController_; 73 base::scoped_nsobject<BrowserActionsController> browserActionsController_;
72 scoped_ptr<BrowserActionsContainerViewSizeDelegate> 74 std::unique_ptr<BrowserActionsContainerViewSizeDelegate>
73 browserActionsContainerDelegate_; 75 browserActionsContainerDelegate_;
74 76
75 // Lazily-instantiated menu controller. 77 // Lazily-instantiated menu controller.
76 base::scoped_nsobject<AppMenuController> appMenuController_; 78 base::scoped_nsobject<AppMenuController> appMenuController_;
77 79
78 // Used for monitoring the optional toolbar button prefs. 80 // Used for monitoring the optional toolbar button prefs.
79 scoped_ptr<ToolbarControllerInternal::NotificationBridge> notificationBridge_; 81 std::unique_ptr<ToolbarControllerInternal::NotificationBridge>
82 notificationBridge_;
80 BooleanPrefMember showHomeButton_; 83 BooleanPrefMember showHomeButton_;
81 BOOL hasToolbar_; // If NO, we may have only the location bar. 84 BOOL hasToolbar_; // If NO, we may have only the location bar.
82 BOOL hasLocationBar_; // If |hasToolbar_| is YES, this must also be YES. 85 BOOL hasLocationBar_; // If |hasToolbar_| is YES, this must also be YES.
83 BOOL locationBarAtMinSize_; // If the location bar is at the minimum size. 86 BOOL locationBarAtMinSize_; // If the location bar is at the minimum size.
84 87
85 // Tracking area for mouse enter/exit/moved in the toolbar. 88 // Tracking area for mouse enter/exit/moved in the toolbar.
86 ui::ScopedCrTrackingArea trackingArea_; 89 ui::ScopedCrTrackingArea trackingArea_;
87 90
88 // We retain/release the hover button since interaction with the 91 // We retain/release the hover button since interaction with the
89 // button may make it go away (e.g. delete menu option over a 92 // button may make it go away (e.g. delete menu option over a
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 @interface ToolbarController(PrivateTestMethods) 192 @interface ToolbarController(PrivateTestMethods)
190 // Returns an array of views in the order of the outlets above. 193 // Returns an array of views in the order of the outlets above.
191 - (NSArray*)toolbarViews; 194 - (NSArray*)toolbarViews;
192 - (void)showOptionalHomeButton; 195 - (void)showOptionalHomeButton;
193 - (void)installAppMenu; 196 - (void)installAppMenu;
194 // Return a hover button for the current event. 197 // Return a hover button for the current event.
195 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; 198 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent;
196 @end 199 @end
197 200
198 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ 201 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698