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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.h

Issue 340003002: Revert of views: Move MenuButton from TextButton to LabelButton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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_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 28 matching lines...) Expand all
39 } 39 }
40 40
41 namespace gfx { 41 namespace gfx {
42 class SlideAnimation; 42 class SlideAnimation;
43 } 43 }
44 44
45 namespace views { 45 namespace views {
46 class CustomButton; 46 class CustomButton;
47 class MenuButton; 47 class MenuButton;
48 class MenuItemView; 48 class MenuItemView;
49 class LabelButton; 49 class TextButton;
50 } 50 }
51 51
52 // BookmarkBarView renders the BookmarkModel. Each starred entry on the 52 // BookmarkBarView renders the BookmarkModel. Each starred entry on the
53 // BookmarkBar is rendered as a MenuButton. An additional MenuButton aligned to 53 // BookmarkBar is rendered as a MenuButton. An additional MenuButton aligned to
54 // the right allows the user to quickly see recently starred entries. 54 // the right allows the user to quickly see recently starred entries.
55 // 55 //
56 // BookmarkBarView shows the bookmarks from a specific Profile. BookmarkBarView 56 // BookmarkBarView shows the bookmarks from a specific Profile. BookmarkBarView
57 // waits until the HistoryService for the profile has been loaded before 57 // waits until the HistoryService for the profile has been loaded before
58 // creating the BookmarkModel. 58 // creating the BookmarkModel.
59 class BookmarkBarView : public DetachableToolbarView, 59 class BookmarkBarView : public DetachableToolbarView,
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 // 282 //
283 // It's easy to get the mapping wrong. For this reason all these methods are 283 // It's easy to get the mapping wrong. For this reason all these methods are
284 // private. 284 // private.
285 285
286 // Returns the number of buttons corresponding to starred urls/folders. This 286 // Returns the number of buttons corresponding to starred urls/folders. This
287 // is equivalent to the number of children the bookmark bar node from the 287 // is equivalent to the number of children the bookmark bar node from the
288 // bookmark bar model has. 288 // bookmark bar model has.
289 int GetBookmarkButtonCount() const; 289 int GetBookmarkButtonCount() const;
290 290
291 // Returns the button at the specified index. 291 // Returns the button at the specified index.
292 views::LabelButton* GetBookmarkButton(int index); 292 views::TextButton* GetBookmarkButton(int index);
293 293
294 // Returns BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR or 294 // Returns BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR or
295 // BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR based on detached state. 295 // BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR based on detached state.
296 BookmarkLaunchLocation GetBookmarkLaunchLocation() const; 296 BookmarkLaunchLocation GetBookmarkLaunchLocation() const;
297 297
298 // Returns the index of the first hidden bookmark button. If all buttons are 298 // Returns the index of the first hidden bookmark button. If all buttons are
299 // visible, this returns GetBookmarkButtonCount(). 299 // visible, this returns GetBookmarkButtonCount().
300 int GetFirstHiddenNodeIndex(); 300 int GetFirstHiddenNodeIndex();
301 301
302 // Creates the button showing the other bookmarked items. 302 // Creates the button showing the other bookmarked items.
303 views::MenuButton* CreateOtherBookmarkedButton(); 303 views::MenuButton* CreateOtherBookmarkedButton();
304 304
305 // Creates the button showing the managed bookmarks items. 305 // Creates the button showing the managed bookmarks items.
306 views::MenuButton* CreateManagedBookmarksButton(); 306 views::MenuButton* CreateManagedBookmarksButton();
307 307
308 // Creates the button used when not all bookmark buttons fit. 308 // Creates the button used when not all bookmark buttons fit.
309 views::MenuButton* CreateOverflowButton(); 309 views::MenuButton* CreateOverflowButton();
310 310
311 // Creates the button for rendering the specified bookmark node. 311 // Creates the button for rendering the specified bookmark node.
312 views::View* CreateBookmarkButton(const BookmarkNode* node); 312 views::View* CreateBookmarkButton(const BookmarkNode* node);
313 313
314 // Creates the button for rendering the apps page shortcut. 314 // Creates the button for rendering the apps page shortcut.
315 views::LabelButton* CreateAppsPageShortcutButton(); 315 views::TextButton* CreateAppsPageShortcutButton();
316 316
317 // Configures the button from the specified node. This sets the text, 317 // Configures the button from the specified node. This sets the text,
318 // and icon. 318 // and icon.
319 void ConfigureButton(const BookmarkNode* node, views::LabelButton* button); 319 void ConfigureButton(const BookmarkNode* node, views::TextButton* button);
320 320
321 // Implementation for BookmarkNodeAddedImpl. 321 // Implementation for BookmarkNodeAddedImpl.
322 void BookmarkNodeAddedImpl(BookmarkModel* model, 322 void BookmarkNodeAddedImpl(BookmarkModel* model,
323 const BookmarkNode* parent, 323 const BookmarkNode* parent,
324 int index); 324 int index);
325 325
326 // Implementation for BookmarkNodeRemoved. 326 // Implementation for BookmarkNodeRemoved.
327 void BookmarkNodeRemovedImpl(BookmarkModel* model, 327 void BookmarkNodeRemovedImpl(BookmarkModel* model,
328 const BookmarkNode* parent, 328 const BookmarkNode* parent,
329 int index); 329 int index);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 // bookmark bar. 405 // bookmark bar.
406 scoped_ptr<BookmarkContextMenu> context_menu_; 406 scoped_ptr<BookmarkContextMenu> context_menu_;
407 407
408 // Shows the other bookmark entries. 408 // Shows the other bookmark entries.
409 views::MenuButton* other_bookmarked_button_; 409 views::MenuButton* other_bookmarked_button_;
410 410
411 // Shows the managed bookmarks entries. 411 // Shows the managed bookmarks entries.
412 views::MenuButton* managed_bookmarks_button_; 412 views::MenuButton* managed_bookmarks_button_;
413 413
414 // Shows the Apps page shortcut. 414 // Shows the Apps page shortcut.
415 views::LabelButton* apps_page_shortcut_; 415 views::TextButton* apps_page_shortcut_;
416 416
417 // Task used to delay showing of the drop menu. 417 // Task used to delay showing of the drop menu.
418 base::WeakPtrFactory<BookmarkBarView> show_folder_method_factory_; 418 base::WeakPtrFactory<BookmarkBarView> show_folder_method_factory_;
419 419
420 // Used to track drops on the bookmark bar view. 420 // Used to track drops on the bookmark bar view.
421 scoped_ptr<DropInfo> drop_info_; 421 scoped_ptr<DropInfo> drop_info_;
422 422
423 // Visible if not all the bookmark buttons fit. 423 // Visible if not all the bookmark buttons fit.
424 views::MenuButton* overflow_button_; 424 views::MenuButton* overflow_button_;
425 425
(...skipping 19 matching lines...) Expand all
445 445
446 BookmarkBar::State bookmark_bar_state_; 446 BookmarkBar::State bookmark_bar_state_;
447 447
448 // Are we animating to or from the detached state? 448 // Are we animating to or from the detached state?
449 bool animating_detached_; 449 bool animating_detached_;
450 450
451 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); 451 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView);
452 }; 452 };
453 453
454 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ 454 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_dialog_views.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698