OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef ASH_SHELF_OVERFLOW_BUBBLE_VIEW_H_ | 5 #ifndef ASH_SHELF_OVERFLOW_BUBBLE_VIEW_H_ |
6 #define ASH_SHELF_OVERFLOW_BUBBLE_VIEW_H_ | 6 #define ASH_SHELF_OVERFLOW_BUBBLE_VIEW_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/shelf/shelf_background_animator.h" | 9 #include "ash/shelf/shelf_background_animator.h" |
10 #include "ash/shelf/shelf_background_animator_observer.h" | 10 #include "ash/shelf/shelf_background_animator_observer.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 views::Widget* bubble_widget) const override; | 40 views::Widget* bubble_widget) const override; |
41 gfx::Rect GetBubbleBounds() override; | 41 gfx::Rect GetBubbleBounds() override; |
42 | 42 |
43 private: | 43 private: |
44 friend class test::OverflowBubbleViewTestAPI; | 44 friend class test::OverflowBubbleViewTestAPI; |
45 | 45 |
46 void ScrollByXOffset(int x_offset); | 46 void ScrollByXOffset(int x_offset); |
47 void ScrollByYOffset(int y_offset); | 47 void ScrollByYOffset(int y_offset); |
48 | 48 |
49 // views::View overrides: | 49 // views::View overrides: |
50 gfx::Size GetPreferredSize() const override; | 50 gfx::Size CalculatePreferredSize() const override; |
51 void Layout() override; | 51 void Layout() override; |
52 void ChildPreferredSizeChanged(views::View* child) override; | 52 void ChildPreferredSizeChanged(views::View* child) override; |
53 bool OnMouseWheel(const ui::MouseWheelEvent& event) override; | 53 bool OnMouseWheel(const ui::MouseWheelEvent& event) override; |
54 | 54 |
55 // ui::EventHandler overrides: | 55 // ui::EventHandler overrides: |
56 void OnScrollEvent(ui::ScrollEvent* event) override; | 56 void OnScrollEvent(ui::ScrollEvent* event) override; |
57 | 57 |
58 // ShelfBackgroundAnimatorObserver: | 58 // ShelfBackgroundAnimatorObserver: |
59 void UpdateShelfBackground(SkColor color) override; | 59 void UpdateShelfBackground(SkColor color) override; |
60 | 60 |
61 WmShelf* wm_shelf_; | 61 WmShelf* wm_shelf_; |
62 views::View* shelf_view_; // Owned by views hierarchy. | 62 views::View* shelf_view_; // Owned by views hierarchy. |
63 gfx::Vector2d scroll_offset_; | 63 gfx::Vector2d scroll_offset_; |
64 | 64 |
65 ShelfBackgroundAnimator background_animator_; | 65 ShelfBackgroundAnimator background_animator_; |
66 | 66 |
67 DISALLOW_COPY_AND_ASSIGN(OverflowBubbleView); | 67 DISALLOW_COPY_AND_ASSIGN(OverflowBubbleView); |
68 }; | 68 }; |
69 | 69 |
70 } // namespace ash | 70 } // namespace ash |
71 | 71 |
72 #endif // ASH_SHELF_OVERFLOW_BUBBLE_VIEW_H_ | 72 #endif // ASH_SHELF_OVERFLOW_BUBBLE_VIEW_H_ |
OLD | NEW |