| 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_util.h" | 8 #include "chrome/browser/extensions/extension_util.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/app_list/app_context_menu.h" | 10 #include "chrome/browser/ui/app_list/app_context_menu.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 | 109 |
| 110 scoped_ptr<SearchResult> AppResult::Duplicate() const { | 110 scoped_ptr<SearchResult> AppResult::Duplicate() const { |
| 111 scoped_ptr<SearchResult> copy( | 111 scoped_ptr<SearchResult> copy( |
| 112 new AppResult(profile_, app_id_, controller_, | 112 new AppResult(profile_, app_id_, controller_, |
| 113 display_type() == DISPLAY_RECOMMENDATION)); | 113 display_type() == DISPLAY_RECOMMENDATION)); |
| 114 copy->set_title(title()); | 114 copy->set_title(title()); |
| 115 copy->set_title_tags(title_tags()); | 115 copy->set_title_tags(title_tags()); |
| 116 copy->set_relevance(relevance()); | 116 copy->set_relevance(relevance()); |
| 117 | 117 |
| 118 return copy.Pass(); | 118 return copy; |
| 119 } | 119 } |
| 120 | 120 |
| 121 ui::MenuModel* AppResult::GetContextMenuModel() { | 121 ui::MenuModel* AppResult::GetContextMenuModel() { |
| 122 if (!context_menu_) { | 122 if (!context_menu_) { |
| 123 context_menu_.reset(new AppContextMenu( | 123 context_menu_.reset(new AppContextMenu( |
| 124 this, profile_, app_id_, controller_)); | 124 this, profile_, app_id_, controller_)); |
| 125 context_menu_->set_is_platform_app(is_platform_app_); | 125 context_menu_->set_is_platform_app(is_platform_app_); |
| 126 context_menu_->set_is_search_result(true); | 126 context_menu_->set_is_search_result(true); |
| 127 } | 127 } |
| 128 | 128 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 const extensions::Extension* extension) { | 194 const extensions::Extension* extension) { |
| 195 UpdateIcon(); | 195 UpdateIcon(); |
| 196 } | 196 } |
| 197 | 197 |
| 198 void AppResult::OnShutdown(extensions::ExtensionRegistry* registry) { | 198 void AppResult::OnShutdown(extensions::ExtensionRegistry* registry) { |
| 199 DCHECK_EQ(extension_registry_, registry); | 199 DCHECK_EQ(extension_registry_, registry); |
| 200 StopObservingExtensionRegistry(); | 200 StopObservingExtensionRegistry(); |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace app_list | 203 } // namespace app_list |
| OLD | NEW |