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

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

Issue 164193005: Refactors the auto-launch logic and adds tests for it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win error 2 Created 6 years, 10 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/test/app_list_test_view_delegate.h ('k') | ui/app_list/views/contents_view.h » ('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 #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 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 callback.Run(base::FilePath()); 88 callback.Run(base::FilePath());
89 } 89 }
90 90
91 void AppListTestViewDelegate::OpenSearchResult(SearchResult* result, 91 void AppListTestViewDelegate::OpenSearchResult(SearchResult* result,
92 bool auto_launch, 92 bool auto_launch,
93 int event_flags) { 93 int event_flags) {
94 ++open_search_result_count_; 94 ++open_search_result_count_;
95 } 95 }
96 96
97 base::TimeDelta AppListTestViewDelegate::GetAutoLaunchTimeout() { 97 base::TimeDelta AppListTestViewDelegate::GetAutoLaunchTimeout() {
98 return base::TimeDelta(); 98 return auto_launch_timeout_;
99 }
100
101 void AppListTestViewDelegate::AutoLaunchCanceled() {
102 auto_launch_timeout_ = base::TimeDelta();
99 } 103 }
100 104
101 void AppListTestViewDelegate::Dismiss() { 105 void AppListTestViewDelegate::Dismiss() {
102 ++dismiss_count_; 106 ++dismiss_count_;
103 } 107 }
104 108
105 gfx::ImageSkia AppListTestViewDelegate::GetWindowIcon() { 109 gfx::ImageSkia AppListTestViewDelegate::GetWindowIcon() {
106 return gfx::ImageSkia(); 110 return gfx::ImageSkia();
107 } 111 }
108 112
(...skipping 19 matching lines...) Expand all
128 observers_.AddObserver(observer); 132 observers_.AddObserver(observer);
129 } 133 }
130 134
131 void AppListTestViewDelegate::RemoveObserver( 135 void AppListTestViewDelegate::RemoveObserver(
132 AppListViewDelegateObserver* observer) { 136 AppListViewDelegateObserver* observer) {
133 observers_.RemoveObserver(observer); 137 observers_.RemoveObserver(observer);
134 } 138 }
135 139
136 } // namespace test 140 } // namespace test
137 } // namespace app_list 141 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/test/app_list_test_view_delegate.h ('k') | ui/app_list/views/contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698