OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/arc_app_result.h" | 5 #include "chrome/browser/ui/app_list/search/arc_app_result.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" | 8 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
9 #include "chrome/browser/ui/app_list/arc/arc_app_context_menu.h" | 9 #include "chrome/browser/ui/app_list/arc/arc_app_context_menu.h" |
10 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h" | 10 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 base::MakeUnique<ArcAppResult>(profile(), app_id(), controller(), | 59 base::MakeUnique<ArcAppResult>(profile(), app_id(), controller(), |
60 display_type() == DISPLAY_RECOMMENDATION); | 60 display_type() == DISPLAY_RECOMMENDATION); |
61 copy->set_title(title()); | 61 copy->set_title(title()); |
62 copy->set_title_tags(title_tags()); | 62 copy->set_title_tags(title_tags()); |
63 copy->set_relevance(relevance()); | 63 copy->set_relevance(relevance()); |
64 | 64 |
65 return copy; | 65 return copy; |
66 } | 66 } |
67 | 67 |
68 ui::MenuModel* ArcAppResult::GetContextMenuModel() { | 68 ui::MenuModel* ArcAppResult::GetContextMenuModel() { |
69 context_menu_.reset(new ArcAppContextMenu( | 69 if (!context_menu_) { |
70 this, profile(), app_id(), controller())); | 70 context_menu_.reset( |
| 71 new ArcAppContextMenu(this, profile(), app_id(), controller())); |
| 72 } |
71 return context_menu_->GetMenuModel(); | 73 return context_menu_->GetMenuModel(); |
72 } | 74 } |
73 | 75 |
74 } // namespace app_list | 76 } // namespace app_list |
OLD | NEW |