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/webstore/webstore_result.h" | 5 #include "chrome/browser/ui/app_list/search/webstore/webstore_result.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 if (is_paid_) { | 89 if (is_paid_) { |
90 // Paid apps cannot be installed directly from the launcher. Instead, open | 90 // Paid apps cannot be installed directly from the launcher. Instead, open |
91 // the webstore page for the app. | 91 // the webstore page for the app. |
92 Open(event_flags); | 92 Open(event_flags); |
93 return; | 93 return; |
94 } | 94 } |
95 | 95 |
96 StartInstall(); | 96 StartInstall(); |
97 } | 97 } |
98 | 98 |
99 scoped_ptr<SearchResult> WebstoreResult::Duplicate() const { | 99 std::unique_ptr<SearchResult> WebstoreResult::Duplicate() const { |
100 scoped_ptr<SearchResult> copy(new WebstoreResult( | 100 std::unique_ptr<SearchResult> copy(new WebstoreResult( |
101 profile_, app_id_, icon_url_, is_paid_, item_type_, controller_)); | 101 profile_, app_id_, icon_url_, is_paid_, item_type_, controller_)); |
102 copy->set_title(title()); | 102 copy->set_title(title()); |
103 copy->set_title_tags(title_tags()); | 103 copy->set_title_tags(title_tags()); |
104 copy->set_relevance(relevance()); | 104 copy->set_relevance(relevance()); |
105 return copy; | 105 return copy; |
106 } | 106 } |
107 | 107 |
108 void WebstoreResult::InitAndStartObserving() { | 108 void WebstoreResult::InitAndStartObserving() { |
109 DCHECK(!install_tracker_ && !extension_registry_); | 109 DCHECK(!install_tracker_ && !extension_registry_); |
110 | 110 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 void WebstoreResult::OnShutdown() { | 239 void WebstoreResult::OnShutdown() { |
240 StopObservingInstall(); | 240 StopObservingInstall(); |
241 } | 241 } |
242 | 242 |
243 void WebstoreResult::OnShutdown(extensions::ExtensionRegistry* registry) { | 243 void WebstoreResult::OnShutdown(extensions::ExtensionRegistry* registry) { |
244 StopObservingRegistry(); | 244 StopObservingRegistry(); |
245 } | 245 } |
246 | 246 |
247 } // namespace app_list | 247 } // namespace app_list |
OLD | NEW |