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" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "ui/app_list/app_list_model.h" | 12 #include "ui/app_list/app_list_model.h" |
13 #include "ui/app_list/app_list_switches.h" | 13 #include "ui/app_list/app_list_switches.h" |
14 #include "ui/app_list/app_list_view_delegate_observer.h" | 14 #include "ui/app_list/app_list_view_delegate_observer.h" |
15 #include "ui/app_list/test/app_list_test_model.h" | 15 #include "ui/app_list/test/app_list_test_model.h" |
16 #include "ui/gfx/image/image_skia.h" | 16 #include "ui/gfx/image/image_skia.h" |
17 | 17 |
18 namespace app_list { | 18 namespace app_list { |
19 namespace test { | 19 namespace test { |
20 | 20 |
21 AppListTestViewDelegate::AppListTestViewDelegate() | 21 AppListTestViewDelegate::AppListTestViewDelegate() |
22 : dismiss_count_(0), | 22 : dismiss_count_(0), |
23 toggle_speech_recognition_count_(0), | 23 toggle_speech_recognition_count_(0), |
24 open_search_result_count_(0), | 24 open_search_result_count_(0), |
25 next_profile_app_count_(0), | 25 next_profile_app_count_(0), |
26 model_(new AppListTestModel), | 26 model_(new AppListTestModel) { |
27 speech_ui_(SPEECH_RECOGNITION_OFF) { | |
28 model_->SetFoldersEnabled(true); | 27 model_->SetFoldersEnabled(true); |
29 } | 28 } |
30 | 29 |
31 AppListTestViewDelegate::~AppListTestViewDelegate() {} | 30 AppListTestViewDelegate::~AppListTestViewDelegate() {} |
32 | 31 |
33 int AppListTestViewDelegate::GetToggleSpeechRecognitionCountAndReset() { | 32 int AppListTestViewDelegate::GetToggleSpeechRecognitionCountAndReset() { |
34 int count = toggle_speech_recognition_count_; | 33 int count = toggle_speech_recognition_count_; |
35 toggle_speech_recognition_count_ = 0; | 34 toggle_speech_recognition_count_ = 0; |
36 return count; | 35 return count; |
37 } | 36 } |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 observers_.AddObserver(observer); | 124 observers_.AddObserver(observer); |
126 } | 125 } |
127 | 126 |
128 void AppListTestViewDelegate::RemoveObserver( | 127 void AppListTestViewDelegate::RemoveObserver( |
129 AppListViewDelegateObserver* observer) { | 128 AppListViewDelegateObserver* observer) { |
130 observers_.RemoveObserver(observer); | 129 observers_.RemoveObserver(observer); |
131 } | 130 } |
132 | 131 |
133 } // namespace test | 132 } // namespace test |
134 } // namespace app_list | 133 } // namespace app_list |
OLD | NEW |