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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 286313003: Remove override of View::HitTestRect() from BookmarkBarView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index fce7df82977b04d38eac162680755e06daad9a46..5f38ca92d5f46423acbd1c517333a726662a640e 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -668,19 +668,6 @@ gfx::Size BookmarkBarView::GetPreferredSize() {
return LayoutItems(true);
}
-bool BookmarkBarView::HitTestRect(const gfx::Rect& rect) const {
- // If bookmark bar is attached and omnibox popup is open (on top of the bar),
- // force hit-testing to fail. This prevents hovers/clicks just above the
- // omnibox popup from activating the top few pixels of items on the bookmark
- // bar.
- if (!IsDetached() && browser_view_ &&
- browser_view_->GetLocationBar()->GetOmniboxView()->model()->
- popup_model()->IsOpen()) {
- return false;
- }
- return DetachableToolbarView::HitTestRect(rect);
-}
-
gfx::Size BookmarkBarView::GetMinimumSize() {
// The minimum width of the bookmark bar should at least contain the overflow
// button, by which one can access all the Bookmark Bar items, and the "Other
@@ -919,6 +906,20 @@ const char* BookmarkBarView::GetClassName() const {
return kViewClassName;
}
+bool BookmarkBarView::CanAcceptEvent(const ui::Event& event) {
+ // If bookmark bar is attached and omnibox popup is open (on top of the bar),
+ // do not allow the bookmark bar to accept events. This prevents, for example,
+ // hovers/clicks just above the omnibox popup from activating the top few
+ // pixels of items on the bookmark bar.
+ if (!IsDetached() && browser_view_ &&
+ browser_view_->GetLocationBar()->GetOmniboxView()->model()->
+ popup_model()->IsOpen()) {
+ return false;
+ }
+
+ return true;
sadrul 2014/05/21 15:46:04 return View::CanAcceptEvent(event)?
tdanderson 2014/05/21 21:11:25 Done.
+}
+
void BookmarkBarView::GetAccessibleState(ui::AXViewState* state) {
state->role = ui::AX_ROLE_TOOLBAR;
state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_BOOKMARKS);
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698