| 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 "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ui/views/bubble/bubble_delegate.h" | 11 #include "ui/views/bubble/bubble_delegate.h" |
| 12 | 12 |
| 13 namespace ash { | 13 namespace ash { |
| 14 class ShelfLayoutManager; | |
| 15 class ShelfView; | 14 class ShelfView; |
| 16 | 15 |
| 17 namespace test { | 16 namespace test { |
| 18 class OverflowBubbleViewTestAPI; | 17 class OverflowBubbleViewTestAPI; |
| 19 } | 18 } |
| 20 | 19 |
| 21 // OverflowBubbleView hosts a ShelfView to display overflown items. | 20 // OverflowBubbleView hosts a ShelfView to display overflown items. |
| 22 // Exports to access this class from OverflowBubbleViewTestAPI. | 21 // Exports to access this class from OverflowBubbleViewTestAPI. |
| 23 class ASH_EXPORT OverflowBubbleView : public views::BubbleDelegateView { | 22 class ASH_EXPORT OverflowBubbleView : public views::BubbleDelegateView { |
| 24 public: | 23 public: |
| (...skipping 20 matching lines...) Expand all Loading... |
| 45 | 44 |
| 46 // views::View overrides: | 45 // views::View overrides: |
| 47 gfx::Size GetPreferredSize() const override; | 46 gfx::Size GetPreferredSize() const override; |
| 48 void Layout() override; | 47 void Layout() override; |
| 49 void ChildPreferredSizeChanged(views::View* child) override; | 48 void ChildPreferredSizeChanged(views::View* child) override; |
| 50 bool OnMouseWheel(const ui::MouseWheelEvent& event) override; | 49 bool OnMouseWheel(const ui::MouseWheelEvent& event) override; |
| 51 | 50 |
| 52 // ui::EventHandler overrides: | 51 // ui::EventHandler overrides: |
| 53 void OnScrollEvent(ui::ScrollEvent* event) override; | 52 void OnScrollEvent(ui::ScrollEvent* event) override; |
| 54 | 53 |
| 55 ShelfLayoutManager* GetShelfLayoutManager() const; | |
| 56 | |
| 57 ShelfView* shelf_view_; // Owned by views hierarchy. | 54 ShelfView* shelf_view_; // Owned by views hierarchy. |
| 58 gfx::Vector2d scroll_offset_; | 55 gfx::Vector2d scroll_offset_; |
| 59 | 56 |
| 60 DISALLOW_COPY_AND_ASSIGN(OverflowBubbleView); | 57 DISALLOW_COPY_AND_ASSIGN(OverflowBubbleView); |
| 61 }; | 58 }; |
| 62 | 59 |
| 63 } // namespace ash | 60 } // namespace ash |
| 64 | 61 |
| 65 #endif // ASH_SHELF_OVERFLOW_BUBBLE_VIEW_H_ | 62 #endif // ASH_SHELF_OVERFLOW_BUBBLE_VIEW_H_ |
| OLD | NEW |