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_VIEW_DELEGATE_H_ | 5 #ifndef UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_ |
6 #define UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_ | 6 #define UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 public: | 25 public: |
26 AppListTestViewDelegate(); | 26 AppListTestViewDelegate(); |
27 virtual ~AppListTestViewDelegate(); | 27 virtual ~AppListTestViewDelegate(); |
28 | 28 |
29 int dismiss_count() { return dismiss_count_; } | 29 int dismiss_count() { return dismiss_count_; } |
30 int open_search_result_count() { return open_search_result_count_; } | 30 int open_search_result_count() { return open_search_result_count_; } |
31 void SetUsers(const Users& users) { | 31 void SetUsers(const Users& users) { |
32 users_ = users; | 32 users_ = users; |
33 } | 33 } |
34 | 34 |
| 35 void set_auto_launch_timeout(const base::TimeDelta& timeout) { |
| 36 auto_launch_timeout_ = timeout; |
| 37 } |
| 38 |
35 // Sets the signin status of the signin delegate, creating one if there isn't | 39 // Sets the signin status of the signin delegate, creating one if there isn't |
36 // one already. | 40 // one already. |
37 void SetSignedIn(bool signed_in); | 41 void SetSignedIn(bool signed_in); |
38 | 42 |
39 // AppListViewDelegate overrides: | 43 // AppListViewDelegate overrides: |
40 virtual bool ForceNativeDesktop() const OVERRIDE; | 44 virtual bool ForceNativeDesktop() const OVERRIDE; |
41 virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE {} | 45 virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE {} |
42 virtual AppListModel* GetModel() OVERRIDE; | 46 virtual AppListModel* GetModel() OVERRIDE; |
43 virtual SigninDelegate* GetSigninDelegate() OVERRIDE; | 47 virtual SigninDelegate* GetSigninDelegate() OVERRIDE; |
44 virtual SpeechUIModel* GetSpeechUI() OVERRIDE; | 48 virtual SpeechUIModel* GetSpeechUI() OVERRIDE; |
45 virtual void GetShortcutPathForApp( | 49 virtual void GetShortcutPathForApp( |
46 const std::string& app_id, | 50 const std::string& app_id, |
47 const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE; | 51 const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE; |
48 virtual void StartSearch() OVERRIDE {} | 52 virtual void StartSearch() OVERRIDE {} |
49 virtual void StopSearch() OVERRIDE {} | 53 virtual void StopSearch() OVERRIDE {} |
50 virtual void OpenSearchResult(SearchResult* result, | 54 virtual void OpenSearchResult(SearchResult* result, |
51 bool auto_launch, | 55 bool auto_launch, |
52 int event_flags) OVERRIDE; | 56 int event_flags) OVERRIDE; |
53 virtual void InvokeSearchResultAction(SearchResult* result, | 57 virtual void InvokeSearchResultAction(SearchResult* result, |
54 int action_index, | 58 int action_index, |
55 int event_flags) OVERRIDE {} | 59 int event_flags) OVERRIDE {} |
56 virtual base::TimeDelta GetAutoLaunchTimeout() OVERRIDE; | 60 virtual base::TimeDelta GetAutoLaunchTimeout() OVERRIDE; |
57 virtual void AutoLaunchCanceled() OVERRIDE {} | 61 virtual void AutoLaunchCanceled() OVERRIDE; |
58 virtual void ViewInitialized() OVERRIDE {} | 62 virtual void ViewInitialized() OVERRIDE {} |
59 virtual void Dismiss() OVERRIDE; | 63 virtual void Dismiss() OVERRIDE; |
60 virtual void ViewClosing() OVERRIDE {} | 64 virtual void ViewClosing() OVERRIDE {} |
61 virtual gfx::ImageSkia GetWindowIcon() OVERRIDE; | 65 virtual gfx::ImageSkia GetWindowIcon() OVERRIDE; |
62 virtual void OpenSettings() OVERRIDE {} | 66 virtual void OpenSettings() OVERRIDE {} |
63 virtual void OpenHelp() OVERRIDE {} | 67 virtual void OpenHelp() OVERRIDE {} |
64 virtual void OpenFeedback() OVERRIDE {} | 68 virtual void OpenFeedback() OVERRIDE {} |
65 virtual void ToggleSpeechRecognition() OVERRIDE {} | 69 virtual void ToggleSpeechRecognition() OVERRIDE {} |
66 virtual void ShowForProfileByPath( | 70 virtual void ShowForProfileByPath( |
67 const base::FilePath& profile_path) OVERRIDE {} | 71 const base::FilePath& profile_path) OVERRIDE {} |
(...skipping 10 matching lines...) Expand all Loading... |
78 AppListTestModel* GetTestModel() { return model_.get(); } | 82 AppListTestModel* GetTestModel() { return model_.get(); } |
79 | 83 |
80 private: | 84 private: |
81 int dismiss_count_; | 85 int dismiss_count_; |
82 int open_search_result_count_; | 86 int open_search_result_count_; |
83 Users users_; | 87 Users users_; |
84 scoped_ptr<TestSigninDelegate> test_signin_delegate_; | 88 scoped_ptr<TestSigninDelegate> test_signin_delegate_; |
85 scoped_ptr<AppListTestModel> model_; | 89 scoped_ptr<AppListTestModel> model_; |
86 ObserverList<AppListViewDelegateObserver> observers_; | 90 ObserverList<AppListViewDelegateObserver> observers_; |
87 SpeechUIModel speech_ui_; | 91 SpeechUIModel speech_ui_; |
| 92 base::TimeDelta auto_launch_timeout_; |
88 | 93 |
89 DISALLOW_COPY_AND_ASSIGN(AppListTestViewDelegate); | 94 DISALLOW_COPY_AND_ASSIGN(AppListTestViewDelegate); |
90 }; | 95 }; |
91 | 96 |
92 } // namespace test | 97 } // namespace test |
93 } // namespace app_list | 98 } // namespace app_list |
94 | 99 |
95 #endif // UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_ | 100 #endif // UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_ |
OLD | NEW |