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

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

Issue 769153007: Managed bookmarks for supervised users (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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_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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 // Returns the index of the first hidden bookmark button. If all buttons are 293 // Returns the index of the first hidden bookmark button. If all buttons are
294 // visible, this returns GetBookmarkButtonCount(). 294 // visible, this returns GetBookmarkButtonCount().
295 int GetFirstHiddenNodeIndex(); 295 int GetFirstHiddenNodeIndex();
296 296
297 // Creates the button showing the "Other Bookmarks" folder. 297 // Creates the button showing the "Other Bookmarks" folder.
298 views::MenuButton* CreateOtherBookmarksButton(); 298 views::MenuButton* CreateOtherBookmarksButton();
299 299
300 // Creates the button showing the "Managed Bookmarks" folder. 300 // Creates the button showing the "Managed Bookmarks" folder.
301 views::MenuButton* CreateManagedBookmarksButton(); 301 views::MenuButton* CreateManagedBookmarksButton();
302 302
303 // Creates the button showing the supervised bookmarks items.
304 views::MenuButton* CreateSupervisedBookmarksButton();
305
303 // Creates the button used when not all bookmark buttons fit. 306 // Creates the button used when not all bookmark buttons fit.
304 views::MenuButton* CreateOverflowButton(); 307 views::MenuButton* CreateOverflowButton();
305 308
306 // Creates the button for rendering the specified bookmark node. 309 // Creates the button for rendering the specified bookmark node.
307 views::View* CreateBookmarkButton(const BookmarkNode* node); 310 views::View* CreateBookmarkButton(const BookmarkNode* node);
308 311
309 // Creates the button for rendering the apps page shortcut. 312 // Creates the button for rendering the apps page shortcut.
310 views::LabelButton* CreateAppsPageShortcutButton(); 313 views::LabelButton* CreateAppsPageShortcutButton();
311 314
312 // Configures the button from the specified node. This sets the text, 315 // Configures the button from the specified node. This sets the text,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // Returns the view to throb when a node is removed. |parent| is the parent of 359 // Returns the view to throb when a node is removed. |parent| is the parent of
357 // the node that was removed, and |old_index| the index of the node that was 360 // the node that was removed, and |old_index| the index of the node that was
358 // removed. 361 // removed.
359 views::CustomButton* DetermineViewToThrobFromRemove( 362 views::CustomButton* DetermineViewToThrobFromRemove(
360 const BookmarkNode* parent, 363 const BookmarkNode* parent,
361 int old_index); 364 int old_index);
362 365
363 // Updates the colors for all the child objects in the bookmarks bar. 366 // Updates the colors for all the child objects in the bookmarks bar.
364 void UpdateColors(); 367 void UpdateColors();
365 368
366 // Updates the visibility of |other_bookmarks_button_| and 369 // Updates the visibility of |other_bookmarks_button_|,
367 // |managed_bookmarks_button_|. Also shows or hides the separator if required. 370 // |managed_bookmarks_button_|, and |supervised_bookmarks_button_|. Also
371 // shows or hides the separator if required.
368 // Returns true if something changed and a LayoutAndPaint() is needed. 372 // Returns true if something changed and a LayoutAndPaint() is needed.
369 bool UpdateOtherAndManagedButtonsVisibility(); 373 bool UpdateOtherAndManagedButtonsVisibility();
370 374
371 // Updates the visibility of |bookmarks_separator_view_|. 375 // Updates the visibility of |bookmarks_separator_view_|.
372 void UpdateBookmarksSeparatorVisibility(); 376 void UpdateBookmarksSeparatorVisibility();
373 377
374 // Updates the visibility of the apps shortcut based on the pref value. 378 // Updates the visibility of the apps shortcut based on the pref value.
375 void OnAppsPageShortcutVisibilityPrefChanged(); 379 void OnAppsPageShortcutVisibilityPrefChanged();
376 380
377 void OnShowManagedBookmarksPrefChanged(); 381 void OnShowManagedBookmarksPrefChanged();
(...skipping 28 matching lines...) Expand all
406 // If non-NULL we're showing a context menu for one of the items on the 410 // If non-NULL we're showing a context menu for one of the items on the
407 // bookmark bar. 411 // bookmark bar.
408 scoped_ptr<BookmarkContextMenu> context_menu_; 412 scoped_ptr<BookmarkContextMenu> context_menu_;
409 413
410 // Shows the "Other Bookmarks" folder button. 414 // Shows the "Other Bookmarks" folder button.
411 views::MenuButton* other_bookmarks_button_; 415 views::MenuButton* other_bookmarks_button_;
412 416
413 // Shows the managed bookmarks entries. 417 // Shows the managed bookmarks entries.
414 views::MenuButton* managed_bookmarks_button_; 418 views::MenuButton* managed_bookmarks_button_;
415 419
420 // Shows the supervised bookmarks entries.
421 views::MenuButton* supervised_bookmarks_button_;
Pam (message me for reviews) 2015/01/14 14:03:37 It seems strange to me that the supervised bookmar
Marc Treib 2015/01/14 16:40:50 Where else would they appear? I suppose we would a
Pam (message me for reviews) 2015/01/15 11:37:04 I expected them to be flat on the bookmarks bar, i
Marc Treib 2015/01/15 12:30:09 FWIW, in the new bookmarks UI (which should launch
422
416 // Shows the Apps page shortcut. 423 // Shows the Apps page shortcut.
417 views::LabelButton* apps_page_shortcut_; 424 views::LabelButton* apps_page_shortcut_;
418 425
419 // Used to track drops on the bookmark bar view. 426 // Used to track drops on the bookmark bar view.
420 scoped_ptr<DropInfo> drop_info_; 427 scoped_ptr<DropInfo> drop_info_;
421 428
422 // Visible if not all the bookmark buttons fit. 429 // Visible if not all the bookmark buttons fit.
423 views::MenuButton* overflow_button_; 430 views::MenuButton* overflow_button_;
424 431
425 // Shows a text and a link to import bookmarks if there are no bookmarks in 432 // Shows a text and a link to import bookmarks if there are no bookmarks in
(...skipping 23 matching lines...) Expand all
449 456
450 ObserverList<BookmarkBarViewObserver> observers_; 457 ObserverList<BookmarkBarViewObserver> observers_;
451 458
452 // Factory used to delay showing of the drop menu. 459 // Factory used to delay showing of the drop menu.
453 base::WeakPtrFactory<BookmarkBarView> show_folder_method_factory_; 460 base::WeakPtrFactory<BookmarkBarView> show_folder_method_factory_;
454 461
455 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); 462 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView);
456 }; 463 };
457 464
458 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ 465 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698