OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |