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

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

Issue 302653002: Introduce the MicButtonTargeter class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compilation 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/app_list.gyp ('k') | 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 26 matching lines...) Expand all
37 } 37 }
38 38
39 void set_auto_launch_timeout(const base::TimeDelta& timeout) { 39 void set_auto_launch_timeout(const base::TimeDelta& timeout) {
40 auto_launch_timeout_ = timeout; 40 auto_launch_timeout_ = timeout;
41 } 41 }
42 42
43 // Sets the signin status of the signin delegate, creating one if there isn't 43 // Sets the signin status of the signin delegate, creating one if there isn't
44 // one already. 44 // one already.
45 void SetSignedIn(bool signed_in); 45 void SetSignedIn(bool signed_in);
46 46
47 // Returns the value of |toggle_speech_recognition_count_| and then
48 // resets this value to 0.
49 int GetToggleSpeechRecognitionCountAndReset();
50
47 // AppListViewDelegate overrides: 51 // AppListViewDelegate overrides:
48 virtual bool ForceNativeDesktop() const OVERRIDE; 52 virtual bool ForceNativeDesktop() const OVERRIDE;
49 virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE {} 53 virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE {}
50 virtual AppListModel* GetModel() OVERRIDE; 54 virtual AppListModel* GetModel() OVERRIDE;
51 virtual SigninDelegate* GetSigninDelegate() OVERRIDE; 55 virtual SigninDelegate* GetSigninDelegate() OVERRIDE;
52 virtual SpeechUIModel* GetSpeechUI() OVERRIDE; 56 virtual SpeechUIModel* GetSpeechUI() OVERRIDE;
53 virtual void GetShortcutPathForApp( 57 virtual void GetShortcutPathForApp(
54 const std::string& app_id, 58 const std::string& app_id,
55 const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE; 59 const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE;
56 virtual void StartSearch() OVERRIDE {} 60 virtual void StartSearch() OVERRIDE {}
57 virtual void StopSearch() OVERRIDE {} 61 virtual void StopSearch() OVERRIDE {}
58 virtual void OpenSearchResult(SearchResult* result, 62 virtual void OpenSearchResult(SearchResult* result,
59 bool auto_launch, 63 bool auto_launch,
60 int event_flags) OVERRIDE; 64 int event_flags) OVERRIDE;
61 virtual void InvokeSearchResultAction(SearchResult* result, 65 virtual void InvokeSearchResultAction(SearchResult* result,
62 int action_index, 66 int action_index,
63 int event_flags) OVERRIDE {} 67 int event_flags) OVERRIDE {}
64 virtual base::TimeDelta GetAutoLaunchTimeout() OVERRIDE; 68 virtual base::TimeDelta GetAutoLaunchTimeout() OVERRIDE;
65 virtual void AutoLaunchCanceled() OVERRIDE; 69 virtual void AutoLaunchCanceled() OVERRIDE;
66 virtual void ViewInitialized() OVERRIDE {} 70 virtual void ViewInitialized() OVERRIDE {}
67 virtual void Dismiss() OVERRIDE; 71 virtual void Dismiss() OVERRIDE;
68 virtual void ViewClosing() OVERRIDE {} 72 virtual void ViewClosing() OVERRIDE {}
69 virtual gfx::ImageSkia GetWindowIcon() OVERRIDE; 73 virtual gfx::ImageSkia GetWindowIcon() OVERRIDE;
70 virtual void OpenSettings() OVERRIDE {} 74 virtual void OpenSettings() OVERRIDE {}
71 virtual void OpenHelp() OVERRIDE {} 75 virtual void OpenHelp() OVERRIDE {}
72 virtual void OpenFeedback() OVERRIDE {} 76 virtual void OpenFeedback() OVERRIDE {}
73 virtual void ToggleSpeechRecognition() OVERRIDE {} 77 virtual void ToggleSpeechRecognition() OVERRIDE;
74 virtual void ShowForProfileByPath( 78 virtual void ShowForProfileByPath(
75 const base::FilePath& profile_path) OVERRIDE {} 79 const base::FilePath& profile_path) OVERRIDE {}
76 virtual content::WebContents* GetStartPageContents() OVERRIDE; 80 virtual content::WebContents* GetStartPageContents() OVERRIDE;
77 virtual content::WebContents* GetSpeechRecognitionContents() OVERRIDE; 81 virtual content::WebContents* GetSpeechRecognitionContents() OVERRIDE;
78 virtual const Users& GetUsers() const OVERRIDE; 82 virtual const Users& GetUsers() const OVERRIDE;
79 virtual bool ShouldCenterWindow() const OVERRIDE; 83 virtual bool ShouldCenterWindow() const OVERRIDE;
80 virtual void AddObserver(AppListViewDelegateObserver* observer) OVERRIDE; 84 virtual void AddObserver(AppListViewDelegateObserver* observer) OVERRIDE;
81 virtual void RemoveObserver(AppListViewDelegateObserver* observer) OVERRIDE; 85 virtual void RemoveObserver(AppListViewDelegateObserver* observer) OVERRIDE;
82 86
83 // Do a bulk replacement of the items in the model. 87 // Do a bulk replacement of the items in the model.
84 void ReplaceTestModel(int item_count); 88 void ReplaceTestModel(int item_count);
85 89
86 AppListTestModel* ReleaseTestModel() { return model_.release(); } 90 AppListTestModel* ReleaseTestModel() { return model_.release(); }
87 AppListTestModel* GetTestModel() { return model_.get(); } 91 AppListTestModel* GetTestModel() { return model_.get(); }
88 92
89 private: 93 private:
90 int dismiss_count_; 94 int dismiss_count_;
95 int toggle_speech_recognition_count_;
91 int open_search_result_count_; 96 int open_search_result_count_;
92 std::map<size_t, int> open_search_result_counts_; 97 std::map<size_t, int> open_search_result_counts_;
93 Users users_; 98 Users users_;
94 scoped_ptr<TestSigninDelegate> test_signin_delegate_; 99 scoped_ptr<TestSigninDelegate> test_signin_delegate_;
95 scoped_ptr<AppListTestModel> model_; 100 scoped_ptr<AppListTestModel> model_;
96 ObserverList<AppListViewDelegateObserver> observers_; 101 ObserverList<AppListViewDelegateObserver> observers_;
97 SpeechUIModel speech_ui_; 102 SpeechUIModel speech_ui_;
98 base::TimeDelta auto_launch_timeout_; 103 base::TimeDelta auto_launch_timeout_;
99 104
100 DISALLOW_COPY_AND_ASSIGN(AppListTestViewDelegate); 105 DISALLOW_COPY_AND_ASSIGN(AppListTestViewDelegate);
101 }; 106 };
102 107
103 } // namespace test 108 } // namespace test
104 } // namespace app_list 109 } // namespace app_list
105 110
106 #endif // UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_ 111 #endif // UI_APP_LIST_TEST_APP_LIST_TEST_VIEW_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/app_list/app_list.gyp ('k') | 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