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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 RecordHistogram(APP_SEARCH_RESULT); 48 RecordHistogram(APP_SEARCH_RESULT);
49 49
50 if (!arc::LaunchApp(profile(), app_id())) 50 if (!arc::LaunchApp(profile(), app_id()))
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 scoped_ptr<SearchResult> ArcAppResult::Duplicate() const { 58 std::unique_ptr<SearchResult> ArcAppResult::Duplicate() const {
59 scoped_ptr<SearchResult> copy( 59 std::unique_ptr<SearchResult> copy(
60 new ArcAppResult(profile(), app_id(), controller(), 60 new 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 if (!context_menu_) { 70 if (!context_menu_) {
71 context_menu_.reset(new ArcAppContextMenu( 71 context_menu_.reset(new ArcAppContextMenu(
72 this, profile(), app_id(), controller())); 72 this, profile(), app_id(), controller()));
73 } 73 }
74 74
75 return context_menu_->GetMenuModel(); 75 return context_menu_->GetMenuModel();
76 } 76 }
77 77
78 } // namespace app_list 78 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/search/arc_app_result.h ('k') | chrome/browser/ui/app_list/search/common/json_response_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698