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

Side by Side Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 544001: Fixes regression where bookmark bar context menu wouldn't show when... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/bookmark_bar_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "chrome/browser/views/bookmark_bar_view.h" 5 #include "chrome/browser/views/bookmark_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 } else if (drop_on) { 708 } else if (drop_on) {
709 parent_node = root->GetChild(index); 709 parent_node = root->GetChild(index);
710 index = parent_node->GetChildCount(); 710 index = parent_node->GetChildCount();
711 } else { 711 } else {
712 parent_node = root; 712 parent_node = root;
713 } 713 }
714 return bookmark_utils::PerformBookmarkDrop(profile_, data, parent_node, 714 return bookmark_utils::PerformBookmarkDrop(profile_, data, parent_node,
715 index); 715 index);
716 } 716 }
717 717
718 void BookmarkBarView::ShowContextMenu(int x, int y, bool is_mouse_gesture) {
719 ShowContextMenu(this, x, y, is_mouse_gesture);
720 }
721
718 bool BookmarkBarView::IsAccessibleViewTraversable(views::View* view) { 722 bool BookmarkBarView::IsAccessibleViewTraversable(views::View* view) {
719 return view != bookmarks_separator_view_ && view != instructions_; 723 return view != bookmarks_separator_view_ && view != instructions_;
720 } 724 }
721 725
722 void BookmarkBarView::OnStateChanged() { 726 void BookmarkBarView::OnStateChanged() {
723 // When the sync state changes, it is sufficient to invoke View::Layout since 727 // When the sync state changes, it is sufficient to invoke View::Layout since
724 // during layout we query the profile sync service and determine whether the 728 // during layout we query the profile sync service and determine whether the
725 // new state requires showing the sync error button so that the user can 729 // new state requires showing the sync error button so that the user can
726 // re-enter her password. If extension shelf appears along with the bookmark 730 // re-enter her password. If extension shelf appears along with the bookmark
727 // shelf, it too needs to be layed out. Since both have the same parent, it is 731 // shelf, it too needs to be layed out. Since both have the same parent, it is
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 // The tooltip is the only way we have to display text explaining the error 1724 // The tooltip is the only way we have to display text explaining the error
1721 // to the user. 1725 // to the user.
1722 sync_error_button->SetTooltipText( 1726 sync_error_button->SetTooltipText(
1723 l10n_util::GetString(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC)); 1727 l10n_util::GetString(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC));
1724 sync_error_button->SetAccessibleName( 1728 sync_error_button->SetAccessibleName(
1725 l10n_util::GetString(IDS_ACCNAME_SYNC_ERROR_BUTTON)); 1729 l10n_util::GetString(IDS_ACCNAME_SYNC_ERROR_BUTTON));
1726 sync_error_button->SetIcon( 1730 sync_error_button->SetIcon(
1727 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING)); 1731 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING));
1728 return sync_error_button; 1732 return sync_error_button;
1729 } 1733 }
OLDNEW
« no previous file with comments | « chrome/browser/views/bookmark_bar_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698