| 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 #ifndef UI_APP_LIST_VIEWS_PAGE_SWITCHER_VERTICAL_H_ | 5 #ifndef UI_APP_LIST_VIEWS_PAGE_SWITCHER_VERTICAL_H_ |
| 6 #define UI_APP_LIST_VIEWS_PAGE_SWITCHER_VERTICAL_H_ | 6 #define UI_APP_LIST_VIEWS_PAGE_SWITCHER_VERTICAL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/app_list/pagination_model_observer.h" | 9 #include "ui/app_list/pagination_model_observer.h" |
| 10 #include "ui/app_list/views/page_switcher.h" | 10 #include "ui/app_list/views/page_switcher.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 // Overridden from PageSwitcher: | 27 // Overridden from PageSwitcher: |
| 28 int GetPageForPoint(const gfx::Point& point) const override; | 28 int GetPageForPoint(const gfx::Point& point) const override; |
| 29 void UpdateUIForDragPoint(const gfx::Point& point) override; | 29 void UpdateUIForDragPoint(const gfx::Point& point) override; |
| 30 | 30 |
| 31 // Overridden from views::View: | 31 // Overridden from views::View: |
| 32 gfx::Size CalculatePreferredSize() const override; | 32 gfx::Size CalculatePreferredSize() const override; |
| 33 void Layout() override; | 33 void Layout() override; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 void CalculateButtonHeightAndSpacing(int contents_height); | |
| 37 | |
| 38 // Overridden from views::ButtonListener: | 36 // Overridden from views::ButtonListener: |
| 39 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 37 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 40 | 38 |
| 41 // Overridden from PaginationModelObserver: | 39 // Overridden from PaginationModelObserver: |
| 42 void TotalPagesChanged() override; | 40 void TotalPagesChanged() override; |
| 43 void SelectedPageChanged(int old_selected, int new_selected) override; | 41 void SelectedPageChanged(int old_selected, int new_selected) override; |
| 44 void TransitionStarted() override; | 42 void TransitionStarted() override; |
| 45 void TransitionChanged() override; | 43 void TransitionChanged() override; |
| 46 | 44 |
| 47 PaginationModel* model_; // Owned by AppsGridView. | 45 PaginationModel* model_; // Owned by AppsGridView. |
| 48 views::View* buttons_; // Owned by views hierarchy. | 46 views::View* buttons_; // Owned by views hierarchy. |
| 49 | 47 |
| 50 DISALLOW_COPY_AND_ASSIGN(PageSwitcherVertical); | 48 DISALLOW_COPY_AND_ASSIGN(PageSwitcherVertical); |
| 51 }; | 49 }; |
| 52 | 50 |
| 53 } // namespace app_list | 51 } // namespace app_list |
| 54 | 52 |
| 55 #endif // UI_APP_LIST_VIEWS_PAGE_SWITCHER_VERTICAL_H_ | 53 #endif // UI_APP_LIST_VIEWS_PAGE_SWITCHER_VERTICAL_H_ |
| OLD | NEW |