Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_APP_LIST_PAGE_SWITCHER_H_ | |
| 6 #define ASH_APP_LIST_PAGE_SWITCHER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "ash/app_list/pagination_model_observer.h" | |
| 10 #include "base/basictypes.h" | |
| 11 #include "ui/views/controls/button/button.h" | |
| 12 #include "ui/views/view.h" | |
| 13 | |
| 14 namespace ash { | |
| 15 | |
| 16 class PaginationModel; | |
| 17 | |
| 18 class PageSwitcher : public views::View, | |
|
sky
2012/05/06 22:51:15
add a description.
xiyuan
2012/05/07 16:46:10
Done.
| |
| 19 public views::ButtonListener, | |
| 20 public PaginationModelObserver { | |
| 21 public: | |
| 22 explicit PageSwitcher(PaginationModel* model); | |
| 23 virtual ~PageSwitcher(); | |
| 24 | |
| 25 private: | |
| 26 // Overridden from views::View: | |
| 27 virtual gfx::Size GetPreferredSize() OVERRIDE; | |
| 28 virtual void Layout() OVERRIDE; | |
| 29 | |
| 30 // Overridden from views::ButtonListener: | |
| 31 virtual void ButtonPressed(views::Button* sender, | |
| 32 const views::Event& event) OVERRIDE; | |
| 33 | |
| 34 // Overridden from PaginationModelObserver: | |
| 35 virtual void TotalPagesChanged() OVERRIDE; | |
| 36 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE; | |
| 37 | |
| 38 PaginationModel* model_; // Owned by parent AppListView. | |
| 39 views::View* buttons_; // Owned by views hierarchy. | |
| 40 | |
| 41 DISALLOW_COPY_AND_ASSIGN(PageSwitcher); | |
| 42 }; | |
| 43 | |
| 44 } // namespace ash | |
| 45 | |
| 46 #endif // ASH_APP_LIST_PAGE_SWITCHER_H_ | |
| OLD | NEW |