Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: ash/app_list/page_switcher.h

Issue 10388032: Move app list from ash to ui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: fix win_aura bot and comments in #5 Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/app_list/icon_cache.cc ('k') | ash/app_list/page_switcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 // PageSwitcher represents its underlying PaginationModel with a button strip.
19 // Each page in the PageinationModel has a button in the strip and when the
20 // button is clicked, the corresponding page becomes selected.
21 class PageSwitcher : public views::View,
22 public views::ButtonListener,
23 public PaginationModelObserver {
24 public:
25 explicit PageSwitcher(PaginationModel* model);
26 virtual ~PageSwitcher();
27
28 private:
29 // Overridden from views::View:
30 virtual gfx::Size GetPreferredSize() OVERRIDE;
31 virtual void Layout() OVERRIDE;
32
33 // Overridden from views::ButtonListener:
34 virtual void ButtonPressed(views::Button* sender,
35 const views::Event& event) OVERRIDE;
36
37 // Overridden from PaginationModelObserver:
38 virtual void TotalPagesChanged() OVERRIDE;
39 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE;
40
41 PaginationModel* model_; // Owned by parent AppListView.
42 views::View* buttons_; // Owned by views hierarchy.
43
44 DISALLOW_COPY_AND_ASSIGN(PageSwitcher);
45 };
46
47 } // namespace ash
48
49 #endif // ASH_APP_LIST_PAGE_SWITCHER_H_
OLDNEW
« no previous file with comments | « ash/app_list/icon_cache.cc ('k') | ash/app_list/page_switcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698