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 ASH_APP_LIST_PAGE_SWITCHER_H_ | 5 #ifndef UI_APP_LIST_PAGE_SWITCHER_H_ |
6 #define ASH_APP_LIST_PAGE_SWITCHER_H_ | 6 #define UI_APP_LIST_PAGE_SWITCHER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/app_list/pagination_model_observer.h" | |
10 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "ui/app_list/pagination_model_observer.h" |
11 #include "ui/views/controls/button/button.h" | 11 #include "ui/views/controls/button/button.h" |
12 #include "ui/views/view.h" | 12 #include "ui/views/view.h" |
13 | 13 |
14 namespace ash { | 14 namespace app_list { |
15 | 15 |
16 class PaginationModel; | 16 class PaginationModel; |
17 | 17 |
18 // PageSwitcher represents its underlying PaginationModel with a button strip. | 18 // PageSwitcher represents its underlying PaginationModel with a button strip. |
19 // Each page in the PageinationModel has a button in the strip and when the | 19 // Each page in the PageinationModel has a button in the strip and when the |
20 // button is clicked, the corresponding page becomes selected. | 20 // button is clicked, the corresponding page becomes selected. |
21 class PageSwitcher : public views::View, | 21 class PageSwitcher : public views::View, |
22 public views::ButtonListener, | 22 public views::ButtonListener, |
23 public PaginationModelObserver { | 23 public PaginationModelObserver { |
24 public: | 24 public: |
(...skipping 12 matching lines...) Expand all Loading... |
37 // Overridden from PaginationModelObserver: | 37 // Overridden from PaginationModelObserver: |
38 virtual void TotalPagesChanged() OVERRIDE; | 38 virtual void TotalPagesChanged() OVERRIDE; |
39 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE; | 39 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE; |
40 | 40 |
41 PaginationModel* model_; // Owned by parent AppListView. | 41 PaginationModel* model_; // Owned by parent AppListView. |
42 views::View* buttons_; // Owned by views hierarchy. | 42 views::View* buttons_; // Owned by views hierarchy. |
43 | 43 |
44 DISALLOW_COPY_AND_ASSIGN(PageSwitcher); | 44 DISALLOW_COPY_AND_ASSIGN(PageSwitcher); |
45 }; | 45 }; |
46 | 46 |
47 } // namespace ash | 47 } // namespace app_list |
48 | 48 |
49 #endif // ASH_APP_LIST_PAGE_SWITCHER_H_ | 49 #endif // UI_APP_LIST_PAGE_SWITCHER_H_ |
OLD | NEW |