Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: ui/app_list/test/app_list_test_view_delegate.h

Issue 305123002: Fix crash in the experimental app list StartPageView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/app_list/test/app_list_test_view_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 int dismiss_count() { return dismiss_count_; } 30 int dismiss_count() { return dismiss_count_; }
31 int open_search_result_count() { return open_search_result_count_; } 31 int open_search_result_count() { return open_search_result_count_; }
32 void SetUsers(const Users& users) { 32 void SetUsers(const Users& users) {
33 users_ = users; 33 users_ = users;
34 } 34 }
35 std::map<size_t, int> open_search_result_counts() { 35 std::map<size_t, int> open_search_result_counts() {
36 return open_search_result_counts_; 36 return open_search_result_counts_;
37 } 37 }
38 38
39 // Sets the number of apps that the model will be created with the next time
40 // SetProfileByPath() is called.
41 void set_next_profile_app_count(int apps) { next_profile_app_count_ = apps; }
42
39 void set_auto_launch_timeout(const base::TimeDelta& timeout) { 43 void set_auto_launch_timeout(const base::TimeDelta& timeout) {
40 auto_launch_timeout_ = timeout; 44 auto_launch_timeout_ = timeout;
41 } 45 }
42 46
43 // Sets the signin status of the signin delegate, creating one if there isn't 47 // Sets the signin status of the signin delegate, creating one if there isn't
44 // one already. 48 // one already.
45 void SetSignedIn(bool signed_in); 49 void SetSignedIn(bool signed_in);
46 50
47 // Returns the value of |toggle_speech_recognition_count_| and then 51 // Returns the value of |toggle_speech_recognition_count_| and then
48 // resets this value to 0. 52 // resets this value to 0.
49 int GetToggleSpeechRecognitionCountAndReset(); 53 int GetToggleSpeechRecognitionCountAndReset();
50 54
51 // AppListViewDelegate overrides: 55 // AppListViewDelegate overrides:
52 virtual bool ForceNativeDesktop() const OVERRIDE; 56 virtual bool ForceNativeDesktop() const OVERRIDE;
53 virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE {} 57 virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE;
54 virtual AppListModel* GetModel() OVERRIDE; 58 virtual AppListModel* GetModel() OVERRIDE;
55 virtual SigninDelegate* GetSigninDelegate() OVERRIDE; 59 virtual SigninDelegate* GetSigninDelegate() OVERRIDE;
56 virtual SpeechUIModel* GetSpeechUI() OVERRIDE; 60 virtual SpeechUIModel* GetSpeechUI() OVERRIDE;
57 virtual void GetShortcutPathForApp( 61 virtual void GetShortcutPathForApp(
58 const std::string& app_id, 62 const std::string& app_id,
59 const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE; 63 const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE;
60 virtual void StartSearch() OVERRIDE {} 64 virtual void StartSearch() OVERRIDE {}
61 virtual void StopSearch() OVERRIDE {} 65 virtual void StopSearch() OVERRIDE {}
62 virtual void OpenSearchResult(SearchResult* result, 66 virtual void OpenSearchResult(SearchResult* result,
63 bool auto_launch, 67 bool auto_launch,
(...skipping 23 matching lines...) Expand all
87 // Do a bulk replacement of the items in the model. 91 // Do a bulk replacement of the items in the model.
88 void ReplaceTestModel(int item_count); 92 void ReplaceTestModel(int item_count);
89 93
90 AppListTestModel* ReleaseTestModel() { return model_.release(); } 94 AppListTestModel* ReleaseTestModel() { return model_.release(); }
91 AppListTestModel* GetTestModel() { return model_.get(); } 95 AppListTestModel* GetTestModel() { return model_.get(); }
92 96
93 private: 97 private:
94 int dismiss_count_; 98 int dismiss_count_;
95 int toggle_speech_recognition_count_; 99 int toggle_speech_recognition_count_;
96 int open_search_result_count_; 100 int open_search_result_count_;
101 int next_profile_app_count_;
97 std::map<size_t, int> open_search_result_counts_; 102 std::map<size_t, int> open_search_result_counts_;
98 Users users_; 103 Users users_;
99 scoped_ptr<TestSigninDelegate> test_signin_delegate_; 104 scoped_ptr<TestSigninDelegate> test_signin_delegate_;
100 scoped_ptr<AppListTestModel> model_; 105 scoped_ptr<AppListTestModel> model_;
101 ObserverList<AppListViewDelegateObserver> observers_; 106 ObserverList<AppListViewDelegateObserver> observers_;
102 SpeechUIModel speech_ui_; 107 SpeechUIModel speech_ui_;
103 base::TimeDelta auto_launch_timeout_; 108 base::TimeDelta auto_launch_timeout_;
104 109
105 DISALLOW_COPY_AND_ASSIGN(AppListTestViewDelegate); 110 DISALLOW_COPY_AND_ASSIGN(AppListTestViewDelegate);
106 }; 111 };
107 112
108 } // namespace test 113 } // namespace test
109 } // namespace app_list 114 } // namespace app_list
110 115
111 #endif // UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_ 116 #endif // UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/test/app_list_test_view_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698