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 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 #include <map> | 10 #include <map> |
11 | 11 |
12 #include "base/memory/scoped_nsobject.h" | 12 #include "base/memory/scoped_nsobject.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h" | 14 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h" |
15 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h" | 15 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h" |
16 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_state.h" | 16 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_state.h" |
17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h" | 17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h" |
18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" | 18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" |
19 #include "chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h" | 19 #include "chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h" |
20 #import "content/common/chrome_application_mac.h" | |
21 #include "webkit/glue/window_open_disposition.h" | 20 #include "webkit/glue/window_open_disposition.h" |
22 | 21 |
23 @class BookmarkBarController; | 22 @class BookmarkBarController; |
24 @class BookmarkBarFolderController; | 23 @class BookmarkBarFolderController; |
25 @class BookmarkBarView; | 24 @class BookmarkBarView; |
26 @class BookmarkButton; | 25 @class BookmarkButton; |
27 @class BookmarkButtonCell; | 26 @class BookmarkButtonCell; |
28 @class BookmarkFolderTarget; | 27 @class BookmarkFolderTarget; |
29 class BookmarkModel; | 28 class BookmarkModel; |
30 @class BookmarkMenu; | 29 @class BookmarkMenu; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 71 |
73 @end | 72 @end |
74 | 73 |
75 // A controller for the bookmark bar in the browser window. Handles showing | 74 // A controller for the bookmark bar in the browser window. Handles showing |
76 // and hiding based on the preference in the given profile. | 75 // and hiding based on the preference in the given profile. |
77 @interface BookmarkBarController : | 76 @interface BookmarkBarController : |
78 NSViewController<BookmarkBarState, | 77 NSViewController<BookmarkBarState, |
79 BookmarkBarToolbarViewController, | 78 BookmarkBarToolbarViewController, |
80 BookmarkButtonDelegate, | 79 BookmarkButtonDelegate, |
81 BookmarkButtonControllerProtocol, | 80 BookmarkButtonControllerProtocol, |
82 CrApplicationEventHookProtocol, | |
83 NSUserInterfaceValidations> { | 81 NSUserInterfaceValidations> { |
84 @private | 82 @private |
85 // The visual state of the bookmark bar. If an animation is running, this is | 83 // The visual state of the bookmark bar. If an animation is running, this is |
86 // set to the "destination" and |lastVisualState_| is set to the "original" | 84 // set to the "destination" and |lastVisualState_| is set to the "original" |
87 // state. This is set to |kInvalidState| on initialization (when the | 85 // state. This is set to |kInvalidState| on initialization (when the |
88 // appropriate state is not yet known). | 86 // appropriate state is not yet known). |
89 bookmarks::VisualState visualState_; | 87 bookmarks::VisualState visualState_; |
90 | 88 |
91 // The "original" state of the bookmark bar if an animation is running, | 89 // The "original" state of the bookmark bar if an animation is running, |
92 // otherwise it should be |kInvalidState|. | 90 // otherwise it should be |kInvalidState|. |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 | 326 |
329 // The following are for testing purposes only and are not used internally. | 327 // The following are for testing purposes only and are not used internally. |
330 - (NSMenu *)menuForFolderNode:(const BookmarkNode*)node; | 328 - (NSMenu *)menuForFolderNode:(const BookmarkNode*)node; |
331 - (NSMenu*)buttonContextMenu; | 329 - (NSMenu*)buttonContextMenu; |
332 - (void)setButtonContextMenu:(id)menu; | 330 - (void)setButtonContextMenu:(id)menu; |
333 // Set to YES in order to prevent animations. | 331 // Set to YES in order to prevent animations. |
334 - (void)setIgnoreAnimations:(BOOL)ignore; | 332 - (void)setIgnoreAnimations:(BOOL)ignore; |
335 @end | 333 @end |
336 | 334 |
337 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ | 335 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ |
OLD | NEW |