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

Side by Side Diff: chrome/browser/ui/app_list/search/arc_app_result.cc

Issue 2701123002: AppList Performance Optimization 2 (Closed)
Patch Set: Cache the tokenized name Created 3 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
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 if (!arc::LaunchApp(profile(), app_id(), event_flags)) 50 if (!arc::LaunchApp(profile(), app_id(), event_flags))
51 return; 51 return;
52 52
53 // Manually close app_list view because focus is not changed on ARC app start, 53 // Manually close app_list view because focus is not changed on ARC app start,
54 // and current view remains active. 54 // and current view remains active.
55 controller()->DismissView(); 55 controller()->DismissView();
56 } 56 }
57 57
58 std::unique_ptr<SearchResult> ArcAppResult::Duplicate() const { 58 std::unique_ptr<SearchResult> ArcAppResult::Duplicate() const {
59 std::unique_ptr<SearchResult> copy( 59 std::unique_ptr<SearchResult> copy =
60 new ArcAppResult(profile(), app_id(), controller(), 60 base::MakeUnique<ArcAppResult>(profile(), app_id(), controller(),
61 display_type() == DISPLAY_RECOMMENDATION)); 61 display_type() == DISPLAY_RECOMMENDATION);
62 copy->set_title(title()); 62 copy->set_title(title());
63 copy->set_title_tags(title_tags()); 63 copy->set_title_tags(title_tags());
64 copy->set_relevance(relevance()); 64 copy->set_relevance(relevance());
65 65
66 return copy; 66 return copy;
67 } 67 }
68 68
69 ui::MenuModel* ArcAppResult::GetContextMenuModel() { 69 ui::MenuModel* ArcAppResult::GetContextMenuModel() {
70 context_menu_.reset(new ArcAppContextMenu( 70 context_menu_.reset(new ArcAppContextMenu(
71 this, profile(), app_id(), controller())); 71 this, profile(), app_id(), controller()));
72 return context_menu_->GetMenuModel(); 72 return context_menu_->GetMenuModel();
73 } 73 }
74 74
75 } // namespace app_list 75 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698