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

Unified Diff: chrome/browser/ui/search/instant_controller.cc

Issue 525793002: Make WebContentsObserver::web_contents() public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 6 years, 3 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/search/instant_controller.cc
diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc
index 0021a5f7e5a728567eb6a9cd607f316ad5e89633..23fc3c3462967cc1dd72190f31ce34bb53edab5b 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -42,7 +42,7 @@ namespace {
bool IsContentsFrom(const InstantPage* page,
const content::WebContents* contents) {
- return page && (page->contents() == contents);
+ return page && (page->web_contents() == contents);
}
// Adds a transient NavigationEntry to the supplied |contents|'s
@@ -87,10 +87,10 @@ bool InstantController::SubmitQuery(const base::string16& search_terms) {
search_mode_.is_origin_search()) {
// Use |instant_tab_| to run the query if we're already on a search results
// page. (NOTE: in particular, we do not send the query to NTPs.)
- SearchTabHelper::FromWebContents(instant_tab_->contents())->Submit(
+ SearchTabHelper::FromWebContents(instant_tab_->web_contents())->Submit(
search_terms);
- instant_tab_->contents()->Focus();
- EnsureSearchTermsAreSet(instant_tab_->contents(), search_terms);
+ instant_tab_->web_contents()->Focus();
+ EnsureSearchTermsAreSet(instant_tab_->web_contents(), search_terms);
return true;
}
return false;
@@ -178,7 +178,7 @@ void InstantController::InstantPageAboutToNavigateMainFrame(
void InstantController::ResetInstantTab() {
if (!search_mode_.is_origin_default()) {
content::WebContents* active_tab = browser_->GetActiveWebContents();
- if (!instant_tab_ || active_tab != instant_tab_->contents()) {
+ if (!instant_tab_ || active_tab != instant_tab_->web_contents()) {
instant_tab_.reset(new InstantTab(this, browser_->profile()));
instant_tab_->Init(active_tab);
UpdateInfoForInstantTab();
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_bubble_model.h ('k') | chrome/browser/ui/search/instant_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698