OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TEST_APP_LIST_TEST_MODEL_H_ | 5 #ifndef UI_APP_LIST_TEST_APP_LIST_TEST_MODEL_H_ |
6 #define UI_APP_LIST_TEST_APP_LIST_TEST_MODEL_H_ | 6 #define UI_APP_LIST_TEST_APP_LIST_TEST_MODEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ui/app_list/app_list_folder_item.h" | 10 #include "ui/app_list/app_list_folder_item.h" |
11 #include "ui/app_list/app_list_item.h" | 11 #include "ui/app_list/app_list_item.h" |
12 #include "ui/app_list/app_list_model.h" | 12 #include "ui/app_list/app_list_model.h" |
13 | 13 |
14 namespace app_list { | 14 namespace app_list { |
15 | 15 |
16 namespace test { | 16 namespace test { |
17 | 17 |
18 // Extends AppListModel with helper functions for use in tests. | 18 // Extends AppListModel with helper functions for use in tests. |
19 class AppListTestModel : public AppListModel { | 19 class AppListTestModel : public AppListModel { |
20 public: | 20 public: |
21 class AppListTestItem : public AppListItem { | 21 class AppListTestItem : public AppListItem { |
22 public: | 22 public: |
23 AppListTestItem(const std::string& id, AppListTestModel* model); | 23 AppListTestItem(const std::string& id, AppListTestModel* model); |
24 virtual ~AppListTestItem(); | 24 virtual ~AppListTestItem(); |
25 virtual void Activate(int event_flags) OVERRIDE; | 25 virtual void Activate(int event_flags) override; |
26 virtual const char* GetItemType() const OVERRIDE; | 26 virtual const char* GetItemType() const override; |
27 | 27 |
28 void SetPosition(const syncer::StringOrdinal& new_position); | 28 void SetPosition(const syncer::StringOrdinal& new_position); |
29 | 29 |
30 private: | 30 private: |
31 AppListTestModel* model_; | 31 AppListTestModel* model_; |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(AppListTestItem); | 33 DISALLOW_COPY_AND_ASSIGN(AppListTestItem); |
34 }; | 34 }; |
35 | 35 |
36 static const char kItemType[]; | 36 static const char kItemType[]; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 int activate_count_; | 81 int activate_count_; |
82 AppListItem* last_activated_; | 82 AppListItem* last_activated_; |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(AppListTestModel); | 84 DISALLOW_COPY_AND_ASSIGN(AppListTestModel); |
85 }; | 85 }; |
86 | 86 |
87 } // namespace test | 87 } // namespace test |
88 } // namespace app_list | 88 } // namespace app_list |
89 | 89 |
90 #endif // UI_APP_LIST_TEST_APP_LIST_TEST_MODEL_H_ | 90 #endif // UI_APP_LIST_TEST_APP_LIST_TEST_MODEL_H_ |
OLD | NEW |