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 int event_flags) OVERRIDE; | 55 int event_flags) OVERRIDE; |
52 virtual void InvokeSearchResultAction(SearchResult* result, | 56 virtual void InvokeSearchResultAction(SearchResult* result, |
53 int action_index, | 57 int action_index, |
54 int event_flags) OVERRIDE {} | 58 int event_flags) OVERRIDE {} |
55 virtual base::TimeDelta GetAutoLaunchTimeout() OVERRIDE; | 59 virtual base::TimeDelta GetAutoLaunchTimeout() OVERRIDE; |
56 virtual void AutoLaunchCanceled() OVERRIDE {} | 60 virtual void AutoLaunchCanceled() OVERRIDE; |
57 virtual void ViewInitialized() OVERRIDE {} | 61 virtual void ViewInitialized() OVERRIDE {} |
58 virtual void Dismiss() OVERRIDE; | 62 virtual void Dismiss() OVERRIDE; |
59 virtual void ViewClosing() OVERRIDE {} | 63 virtual void ViewClosing() OVERRIDE {} |
60 virtual gfx::ImageSkia GetWindowIcon() OVERRIDE; | 64 virtual gfx::ImageSkia GetWindowIcon() OVERRIDE; |
61 virtual void OpenSettings() OVERRIDE {} | 65 virtual void OpenSettings() OVERRIDE {} |
62 virtual void OpenHelp() OVERRIDE {} | 66 virtual void OpenHelp() OVERRIDE {} |
63 virtual void OpenFeedback() OVERRIDE {} | 67 virtual void OpenFeedback() OVERRIDE {} |
64 virtual void ToggleSpeechRecognition() OVERRIDE {} | 68 virtual void ToggleSpeechRecognition() OVERRIDE {} |
65 virtual void ShowForProfileByPath( | 69 virtual void ShowForProfileByPath( |
66 const base::FilePath& profile_path) OVERRIDE {} | 70 const base::FilePath& profile_path) OVERRIDE {} |
(...skipping 10 matching lines...) Expand all Loading... |
77 AppListTestModel* GetTestModel() { return model_.get(); } | 81 AppListTestModel* GetTestModel() { return model_.get(); } |
78 | 82 |
79 private: | 83 private: |
80 int dismiss_count_; | 84 int dismiss_count_; |
81 int open_search_result_count_; | 85 int open_search_result_count_; |
82 Users users_; | 86 Users users_; |
83 scoped_ptr<TestSigninDelegate> test_signin_delegate_; | 87 scoped_ptr<TestSigninDelegate> test_signin_delegate_; |
84 scoped_ptr<AppListTestModel> model_; | 88 scoped_ptr<AppListTestModel> model_; |
85 ObserverList<AppListViewDelegateObserver> observers_; | 89 ObserverList<AppListViewDelegateObserver> observers_; |
86 SpeechUIModel speech_ui_; | 90 SpeechUIModel speech_ui_; |
| 91 base::TimeDelta auto_launch_timeout_; |
87 | 92 |
88 DISALLOW_COPY_AND_ASSIGN(AppListTestViewDelegate); | 93 DISALLOW_COPY_AND_ASSIGN(AppListTestViewDelegate); |
89 }; | 94 }; |
90 | 95 |
91 } // namespace test | 96 } // namespace test |
92 } // namespace app_list | 97 } // namespace app_list |
93 | 98 |
94 #endif // UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_ | 99 #endif // UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_ |
OLD | NEW |