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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 View* GetTooltipHandlerForPoint(const gfx::Point& point) override { | 220 View* GetTooltipHandlerForPoint(const gfx::Point& point) override { |
221 return HitTestPoint(point) && CanProcessEventsWithinSubtree() ? this : NULL; | 221 return HitTestPoint(point) && CanProcessEventsWithinSubtree() ? this : NULL; |
222 } | 222 } |
223 | 223 |
224 scoped_ptr<LabelButtonBorder> CreateDefaultBorder() const override { | 224 scoped_ptr<LabelButtonBorder> CreateDefaultBorder() const override { |
225 scoped_ptr<LabelButtonBorder> border = LabelButton::CreateDefaultBorder(); | 225 scoped_ptr<LabelButtonBorder> border = LabelButton::CreateDefaultBorder(); |
226 border->set_insets(gfx::Insets(kButtonPaddingVertical, | 226 border->set_insets(gfx::Insets(kButtonPaddingVertical, |
227 kButtonPaddingHorizontal, | 227 kButtonPaddingHorizontal, |
228 kButtonPaddingVertical, | 228 kButtonPaddingVertical, |
229 kButtonPaddingHorizontal)); | 229 kButtonPaddingHorizontal)); |
230 return border.Pass(); | 230 return border; |
231 } | 231 } |
232 | 232 |
233 bool IsTriggerableEvent(const ui::Event& e) override { | 233 bool IsTriggerableEvent(const ui::Event& e) override { |
234 return e.type() == ui::ET_GESTURE_TAP || | 234 return e.type() == ui::ET_GESTURE_TAP || |
235 e.type() == ui::ET_GESTURE_TAP_DOWN || | 235 e.type() == ui::ET_GESTURE_TAP_DOWN || |
236 event_utils::IsPossibleDispositionEvent(e); | 236 event_utils::IsPossibleDispositionEvent(e); |
237 } | 237 } |
238 | 238 |
239 private: | 239 private: |
240 scoped_ptr<gfx::SlideAnimation> show_animation_; | 240 scoped_ptr<gfx::SlideAnimation> show_animation_; |
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2104 return; | 2104 return; |
2105 apps_page_shortcut_->SetVisible(visible); | 2105 apps_page_shortcut_->SetVisible(visible); |
2106 UpdateBookmarksSeparatorVisibility(); | 2106 UpdateBookmarksSeparatorVisibility(); |
2107 LayoutAndPaint(); | 2107 LayoutAndPaint(); |
2108 } | 2108 } |
2109 | 2109 |
2110 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { | 2110 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { |
2111 if (UpdateOtherAndManagedButtonsVisibility()) | 2111 if (UpdateOtherAndManagedButtonsVisibility()) |
2112 LayoutAndPaint(); | 2112 LayoutAndPaint(); |
2113 } | 2113 } |
OLD | NEW |