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

Side by Side Diff: chrome/browser/ui/intents/web_intent_picker_controller.cc

Issue 10696222: Make chrome::Navigate take in a Browser* that is never NULL. That function doesn't have a context, … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/intents/web_intent_picker_controller.h" 5 #include "chrome/browser/ui/intents/web_intent_picker_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 intents_dispatcher_->DispatchIntent(contents->web_contents()); 294 intents_dispatcher_->DispatchIntent(contents->web_contents());
295 service_tab_ = contents->web_contents(); 295 service_tab_ = contents->web_contents();
296 296
297 // This call performs all the tab strip manipulation, notifications, etc. 297 // This call performs all the tab strip manipulation, notifications, etc.
298 // Since we're passing in a target_contents, it assumes that we will 298 // Since we're passing in a target_contents, it assumes that we will
299 // navigate the page ourselves, though. 299 // navigate the page ourselves, though.
300 chrome::NavigateParams params(browser, url, 300 chrome::NavigateParams params(browser, url,
301 content::PAGE_TRANSITION_AUTO_BOOKMARK); 301 content::PAGE_TRANSITION_AUTO_BOOKMARK);
302 params.target_contents = contents; 302 params.target_contents = contents;
303 params.disposition = NEW_FOREGROUND_TAB; 303 params.disposition = NEW_FOREGROUND_TAB;
304 params.profile = tab_contents_->profile();
305 chrome::Navigate(&params); 304 chrome::Navigate(&params);
306 305
307 service_tab_->GetController().LoadURL( 306 service_tab_->GetController().LoadURL(
308 url, content::Referrer(), 307 url, content::Referrer(),
309 content::PAGE_TRANSITION_AUTO_BOOKMARK, std::string()); 308 content::PAGE_TRANSITION_AUTO_BOOKMARK, std::string());
310 309
311 ClosePicker(); 310 ClosePicker();
312 break; 311 break;
313 } 312 }
314 313
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 // If picker is non-NULL, it was set by a test. 709 // If picker is non-NULL, it was set by a test.
711 if (picker_ == NULL) 710 if (picker_ == NULL)
712 picker_ = WebIntentPicker::Create(tab_contents_, this, picker_model_.get()); 711 picker_ = WebIntentPicker::Create(tab_contents_, this, picker_model_.get());
713 picker_shown_ = true; 712 picker_shown_ = true;
714 } 713 }
715 714
716 void WebIntentPickerController::ClosePicker() { 715 void WebIntentPickerController::ClosePicker() {
717 if (picker_) 716 if (picker_)
718 picker_->Close(); 717 picker_->Close();
719 } 718 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator_browsertest.cc ('k') | chrome/browser/ui/webui/web_dialog_web_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698