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

Unified Diff: chrome/browser/ui/intents/web_intent_picker_controller.cc

Issue 10134026: Remove browser from web intents UI code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Browser test compilation Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/intents/web_intent_picker_controller.cc
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.cc b/chrome/browser/ui/intents/web_intent_picker_controller.cc
index 08541a169c0390ec5aabc991688a1f737d6fcb48..88b3e4e8710baca3d4c62b3b3f9f464e7d99483f 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller.cc
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.cc
@@ -162,8 +162,7 @@ void WebIntentPickerController::SetIntentsDispatcher(
weak_ptr_factory_.GetWeakPtr()));
}
-void WebIntentPickerController::ShowDialog(Browser* browser,
- const string16& action,
+void WebIntentPickerController::ShowDialog(const string16& action,
const string16& type) {
// Only show a picker once.
// TODO(gbillock): There's a hole potentially admitting multiple
@@ -253,9 +252,9 @@ void WebIntentPickerController::OnServiceChosen(const GURL& url,
Browser* browser = Browser::GetBrowserForController(
&wrapper_->web_contents()->GetController(), &index);
TabContentsWrapper* contents = Browser::TabContentsFactory(
- browser->profile(),
+ wrapper_->profile(),
tab_util::GetSiteInstanceForNewTab(
- browser->profile(), url),
+ wrapper_->profile(), url),
MSG_ROUTING_NONE, NULL, NULL);
intents_dispatcher_->DispatchIntent(contents->web_contents());
@@ -608,12 +607,8 @@ void WebIntentPickerController::AsyncOperationFinished() {
void WebIntentPickerController::CreatePicker() {
// If picker is non-NULL, it was set by a test.
- Browser* browser =
- BrowserList::FindBrowserWithWebContents(wrapper_->web_contents());
- if (picker_ == NULL) {
- picker_ = WebIntentPicker::Create(browser, wrapper_, this,
- picker_model_.get());
- }
+ if (picker_ == NULL)
+ picker_ = WebIntentPicker::Create(wrapper_, this, picker_model_.get());
picker_shown_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698