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

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

Issue 10381018: ash: First pass of Applist v2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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_PAGINATION_MODEL_H_
6 #define ASH_APP_LIST_PAGINATION_MODEL_H_
7 #pragma once
8
9 #include "ash/ash_export.h"
10 #include "base/basictypes.h"
11 #include "base/observer_list.h"
12
13 namespace ash {
14
15 class PaginationModelObserver;
16
17 class ASH_EXPORT PaginationModel {
18 public:
19 PaginationModel();
20 ~PaginationModel();
21
22 void SetTotalPages(int total_pages);
23 void SelectPage(int page);
24
25 void AddObserver(PaginationModelObserver* observer);
26 void RemoveObserver(PaginationModelObserver* observer);
27
28 int total_pages() const {
29 return total_pages_;
30 }
31
32 int selected_page() const {
33 return selected_page_;
34 }
35
36 private:
37 int total_pages_;
38 int selected_page_;
39 ObserverList<PaginationModelObserver> observers_;
40
41 DISALLOW_COPY_AND_ASSIGN(PaginationModel);
42 };
43
44 } // namespace ui
tfarina 2012/05/04 22:39:19 nit: namespace ash
xiyuan 2012/05/04 23:00:28 Done.
45
46 #endif // ASH_APP_LIST_PAGINATION_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698