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

Unified Diff: chrome/browser/ui/app_list/search/search_webstore_result.cc

Issue 644863002: Introduce OpenURL to AppListControllerDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/search/search_webstore_result.cc
diff --git a/chrome/browser/ui/app_list/search/search_webstore_result.cc b/chrome/browser/ui/app_list/search/search_webstore_result.cc
index 03a1766f2fe4b66100f2e6ef481e8892496981eb..18255e93a5cc6153c25fbe2d06ceac6a84646ae2 100644
--- a/chrome/browser/ui/app_list/search/search_webstore_result.cc
+++ b/chrome/browser/ui/app_list/search/search_webstore_result.cc
@@ -6,8 +6,8 @@
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
#include "chrome/browser/ui/app_list/search/search_util.h"
-#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/grit/generated_resources.h"
#include "extensions/common/extension_urls.h"
@@ -18,9 +18,12 @@
namespace app_list {
-SearchWebstoreResult::SearchWebstoreResult(Profile* profile,
- const std::string& query)
+SearchWebstoreResult::SearchWebstoreResult(
+ Profile* profile,
+ AppListControllerDelegate* controller,
+ const std::string& query)
: profile_(profile),
+ controller_(controller),
query_(query),
launch_url_(extension_urls::GetWebstoreSearchPageUrl(query)) {
set_id(launch_url_.spec());
@@ -49,15 +52,15 @@ void SearchWebstoreResult::Open(int event_flags) {
extension_urls::kWebstoreSourceField,
extension_urls::kLaunchSourceAppListSearch);
- chrome::NavigateParams params(profile_,
- store_url,
- ui::PAGE_TRANSITION_LINK);
- params.disposition = ui::DispositionFromEventFlags(event_flags);
- chrome::Navigate(&params);
+ controller_->OpenURL(profile_,
+ store_url,
+ ui::PAGE_TRANSITION_LINK,
+ ui::DispositionFromEventFlags(event_flags));
}
scoped_ptr<SearchResult> SearchWebstoreResult::Duplicate() {
- return scoped_ptr<SearchResult>(new SearchWebstoreResult(profile_, query_));
+ return scoped_ptr<SearchResult>(
+ new SearchWebstoreResult(profile_, controller_, query_));
}
} // namespace app_list

Powered by Google App Engine
This is Rietveld 408576698