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 #include "ui/app_list/test/app_list_test_view_delegate.h" | 5 #include "ui/app_list/test/app_list_test_view_delegate.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 #endif | 93 #endif |
94 | 94 |
95 bool AppListTestViewDelegate::IsSpeechRecognitionEnabled() { | 95 bool AppListTestViewDelegate::IsSpeechRecognitionEnabled() { |
96 return false; | 96 return false; |
97 } | 97 } |
98 | 98 |
99 const AppListViewDelegate::Users& AppListTestViewDelegate::GetUsers() const { | 99 const AppListViewDelegate::Users& AppListTestViewDelegate::GetUsers() const { |
100 return users_; | 100 return users_; |
101 } | 101 } |
102 | 102 |
103 bool AppListTestViewDelegate::ShouldCenterWindow() const { | |
104 return app_list::switches::IsCenteredAppListEnabled(); | |
105 } | |
106 | |
107 void AppListTestViewDelegate::ReplaceTestModel(int item_count) { | 103 void AppListTestViewDelegate::ReplaceTestModel(int item_count) { |
108 model_.reset(new AppListTestModel); | 104 model_.reset(new AppListTestModel); |
109 model_->PopulateApps(item_count); | 105 model_->PopulateApps(item_count); |
110 } | 106 } |
111 | 107 |
112 void AppListTestViewDelegate::AddObserver( | 108 void AppListTestViewDelegate::AddObserver( |
113 AppListViewDelegateObserver* observer) { | 109 AppListViewDelegateObserver* observer) { |
114 observers_.AddObserver(observer); | 110 observers_.AddObserver(observer); |
115 } | 111 } |
116 | 112 |
117 void AppListTestViewDelegate::RemoveObserver( | 113 void AppListTestViewDelegate::RemoveObserver( |
118 AppListViewDelegateObserver* observer) { | 114 AppListViewDelegateObserver* observer) { |
119 observers_.RemoveObserver(observer); | 115 observers_.RemoveObserver(observer); |
120 } | 116 } |
121 | 117 |
122 } // namespace test | 118 } // namespace test |
123 } // namespace app_list | 119 } // namespace app_list |
OLD | NEW |