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_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 #include <map> | 9 #include <map> |
10 | 10 |
| 11 #import "base/mac/cocoa_protocols.h" |
11 #include "base/memory/scoped_nsobject.h" | 12 #include "base/memory/scoped_nsobject.h" |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #import "chrome/browser/chrome_browser_application_mac.h" | 14 #import "chrome/browser/chrome_browser_application_mac.h" |
14 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h" | 15 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h" |
15 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h" | 16 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h" |
16 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_state.h" | 17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_state.h" |
17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h" | 18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h" |
18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" | 19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" |
19 #include "chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h" | 20 #include "chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h" |
20 #include "webkit/glue/window_open_disposition.h" | 21 #include "webkit/glue/window_open_disposition.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 @end | 143 @end |
143 | 144 |
144 // A controller for the bookmark bar in the browser window. Handles showing | 145 // A controller for the bookmark bar in the browser window. Handles showing |
145 // and hiding based on the preference in the given profile. | 146 // and hiding based on the preference in the given profile. |
146 @interface BookmarkBarController : | 147 @interface BookmarkBarController : |
147 NSViewController<BookmarkBarState, | 148 NSViewController<BookmarkBarState, |
148 BookmarkBarToolbarViewController, | 149 BookmarkBarToolbarViewController, |
149 BookmarkButtonDelegate, | 150 BookmarkButtonDelegate, |
150 BookmarkButtonControllerProtocol, | 151 BookmarkButtonControllerProtocol, |
151 CrApplicationEventHookProtocol, | 152 CrApplicationEventHookProtocol, |
152 NSUserInterfaceValidations> { | 153 NSUserInterfaceValidations, |
| 154 NSDraggingDestination> { |
153 @private | 155 @private |
154 // The visual state of the bookmark bar. If an animation is running, this is | 156 // The visual state of the bookmark bar. If an animation is running, this is |
155 // set to the "destination" and |lastVisualState_| is set to the "original" | 157 // set to the "destination" and |lastVisualState_| is set to the "original" |
156 // state. This is set to |kInvalidState| on initialization (when the | 158 // state. This is set to |kInvalidState| on initialization (when the |
157 // appropriate state is not yet known). | 159 // appropriate state is not yet known). |
158 bookmarks::VisualState visualState_; | 160 bookmarks::VisualState visualState_; |
159 | 161 |
160 // The "original" state of the bookmark bar if an animation is running, | 162 // The "original" state of the bookmark bar if an animation is running, |
161 // otherwise it should be |kInvalidState|. | 163 // otherwise it should be |kInvalidState|. |
162 bookmarks::VisualState lastVisualState_; | 164 bookmarks::VisualState lastVisualState_; |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 | 399 |
398 // The following are for testing purposes only and are not used internally. | 400 // The following are for testing purposes only and are not used internally. |
399 - (NSMenu *)menuForFolderNode:(const BookmarkNode*)node; | 401 - (NSMenu *)menuForFolderNode:(const BookmarkNode*)node; |
400 - (NSMenu*)buttonContextMenu; | 402 - (NSMenu*)buttonContextMenu; |
401 - (void)setButtonContextMenu:(id)menu; | 403 - (void)setButtonContextMenu:(id)menu; |
402 // Set to YES in order to prevent animations. | 404 // Set to YES in order to prevent animations. |
403 - (void)setIgnoreAnimations:(BOOL)ignore; | 405 - (void)setIgnoreAnimations:(BOOL)ignore; |
404 @end | 406 @end |
405 | 407 |
406 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ | 408 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ |
OLD | NEW |