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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 } 405 }
406 return MenuButton::OnMousePressed(event); 406 return MenuButton::OnMousePressed(event);
407 } 407 }
408 408
409 bool IsTriggerableEventType(const ui::Event& e) override { 409 bool IsTriggerableEventType(const ui::Event& e) override {
410 // Bookmark folders handle normal menu button events (i.e., left click) as 410 // Bookmark folders handle normal menu button events (i.e., left click) as
411 // well as clicks to open bookmarks in new tabs that would otherwise be 411 // well as clicks to open bookmarks in new tabs that would otherwise be
412 // ignored. 412 // ignored.
413 return BookmarkMenuButtonBase::IsTriggerableEventType(e) || 413 return BookmarkMenuButtonBase::IsTriggerableEventType(e) ||
414 (e.IsMouseEvent() && 414 (e.IsMouseEvent() &&
415 ui::DispositionFromEventFlags(e.flags()) != CURRENT_TAB); 415 ui::DispositionFromEventFlags(e.flags()) !=
416 WindowOpenDisposition::CURRENT_TAB);
416 } 417 }
417 418
418 private: 419 private:
419 std::unique_ptr<gfx::SlideAnimation> show_animation_; 420 std::unique_ptr<gfx::SlideAnimation> show_animation_;
420 421
421 DISALLOW_COPY_AND_ASSIGN(BookmarkFolderButton); 422 DISALLOW_COPY_AND_ASSIGN(BookmarkFolderButton);
422 }; 423 };
423 424
424 // OverflowButton (chevron) -------------------------------------------------- 425 // OverflowButton (chevron) --------------------------------------------------
425 426
(...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after
2174 return; 2175 return;
2175 apps_page_shortcut_->SetVisible(visible); 2176 apps_page_shortcut_->SetVisible(visible);
2176 UpdateBookmarksSeparatorVisibility(); 2177 UpdateBookmarksSeparatorVisibility();
2177 LayoutAndPaint(); 2178 LayoutAndPaint();
2178 } 2179 }
2179 2180
2180 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { 2181 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() {
2181 if (UpdateOtherAndManagedButtonsVisibility()) 2182 if (UpdateOtherAndManagedButtonsVisibility())
2182 LayoutAndPaint(); 2183 LayoutAndPaint();
2183 } 2184 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698