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 #include "chrome/browser/ui/app_list/search/app_result.h" | 5 #include "chrome/browser/ui/app_list/search/app_result.h" |
6 | 6 |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/browser/extensions/extension_util.h" | 9 #include "chrome/browser/extensions/extension_util.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 content::RecordAction( | 116 content::RecordAction( |
117 base::UserMetricsAction("AppList_ClickOnAppFromSearch")); | 117 base::UserMetricsAction("AppList_ClickOnAppFromSearch")); |
118 | 118 |
119 controller_->ActivateApp( | 119 controller_->ActivateApp( |
120 profile_, | 120 profile_, |
121 extension, | 121 extension, |
122 AppListControllerDelegate::LAUNCH_FROM_APP_LIST_SEARCH, | 122 AppListControllerDelegate::LAUNCH_FROM_APP_LIST_SEARCH, |
123 event_flags); | 123 event_flags); |
124 } | 124 } |
125 | 125 |
126 scoped_ptr<SearchResult> AppResult::Duplicate() { | 126 scoped_ptr<SearchResult> AppResult::Duplicate() const { |
127 scoped_ptr<SearchResult> copy( | 127 scoped_ptr<SearchResult> copy( |
128 new AppResult(profile_, app_id_, controller_, | 128 new AppResult(profile_, app_id_, controller_, |
129 display_type() == DISPLAY_RECOMMENDATION)); | 129 display_type() == DISPLAY_RECOMMENDATION)); |
130 copy->set_title(title()); | 130 copy->set_title(title()); |
131 copy->set_title_tags(title_tags()); | 131 copy->set_title_tags(title_tags()); |
132 | 132 |
133 return copy.Pass(); | 133 return copy.Pass(); |
134 } | 134 } |
135 | 135 |
136 ui::MenuModel* AppResult::GetContextMenuModel() { | 136 ui::MenuModel* AppResult::GetContextMenuModel() { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 const extensions::Extension* extension) { | 209 const extensions::Extension* extension) { |
210 UpdateIcon(); | 210 UpdateIcon(); |
211 } | 211 } |
212 | 212 |
213 void AppResult::OnShutdown(extensions::ExtensionRegistry* registry) { | 213 void AppResult::OnShutdown(extensions::ExtensionRegistry* registry) { |
214 DCHECK_EQ(extension_registry_, registry); | 214 DCHECK_EQ(extension_registry_, registry); |
215 StopObservingExtensionRegistry(); | 215 StopObservingExtensionRegistry(); |
216 } | 216 } |
217 | 217 |
218 } // namespace app_list | 218 } // namespace app_list |
OLD | NEW |