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_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // calculating the preferred height. | 279 // calculating the preferred height. |
280 void Init(); | 280 void Init(); |
281 | 281 |
282 // NOTE: unless otherwise stated all methods that take an int for an index are | 282 // NOTE: unless otherwise stated all methods that take an int for an index are |
283 // in terms of the bookmark bar view. Typically the view index and model index | 283 // in terms of the bookmark bar view. Typically the view index and model index |
284 // are the same, but they may differ during animations or drag and drop. | 284 // are the same, but they may differ during animations or drag and drop. |
285 // | 285 // |
286 // It's easy to get the mapping wrong. For this reason all these methods are | 286 // It's easy to get the mapping wrong. For this reason all these methods are |
287 // private. | 287 // private. |
288 | 288 |
289 // Returns the number of buttons corresponding to starred urls/folders. This | 289 // Returns the number of bookmark bar url/folder buttons that have been |
290 // is equivalent to the number of children the bookmark bar node from the | 290 // created. This does not necessarily represent the number of bookmark bar |
291 // bookmark bar model has. | 291 // nodes, nor the number of visible bookmark bar buttons. Buttons are created |
| 292 // lazily to fill available space, and may be hidden for ordering or sizing |
| 293 // changes. |
292 int GetBookmarkButtonCount() const; | 294 int GetBookmarkButtonCount() const; |
293 | 295 |
294 // Returns the button at the specified index. | 296 // Returns the button at the specified index. |
295 views::LabelButton* GetBookmarkButton(int index); | 297 views::LabelButton* GetBookmarkButton(int index); |
296 | 298 |
297 // Returns BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR or | 299 // Returns BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR or |
298 // BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR based on detached state. | 300 // BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR based on detached state. |
299 BookmarkLaunchLocation GetBookmarkLaunchLocation() const; | 301 BookmarkLaunchLocation GetBookmarkLaunchLocation() const; |
300 | 302 |
301 // Returns the index of the first hidden bookmark button. If all buttons are | 303 // Returns the index of the first hidden bookmark button. If all buttons are |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 | 459 |
458 ObserverList<BookmarkBarViewObserver> observers_; | 460 ObserverList<BookmarkBarViewObserver> observers_; |
459 | 461 |
460 // Factory used to delay showing of the drop menu. | 462 // Factory used to delay showing of the drop menu. |
461 base::WeakPtrFactory<BookmarkBarView> show_folder_method_factory_; | 463 base::WeakPtrFactory<BookmarkBarView> show_folder_method_factory_; |
462 | 464 |
463 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); | 465 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); |
464 }; | 466 }; |
465 | 467 |
466 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ | 468 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ |
OLD | NEW |