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

Unified Diff: chrome/browser/ui/find_bar/find_tab_helper.cc

Issue 9030010: Move most of the remaining users of WebContentsObserver::tab_contents() to use web_contents(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_controller.cc ('k') | chrome/browser/ui/prefs/prefs_tab_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/find_bar/find_tab_helper.cc
===================================================================
--- chrome/browser/ui/find_bar/find_tab_helper.cc (revision 115777)
+++ chrome/browser/ui/find_bar/find_tab_helper.cc (working copy)
@@ -16,6 +16,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
using WebKit::WebFindOptions;
+using content::WebContents;
// static
int FindTabHelper::find_request_id_counter_ = -1;
@@ -39,7 +40,7 @@
// shortcut so unless we have something to search for we return early.
if (search_string.empty() && find_text_.empty()) {
Profile* profile =
- Profile::FromBrowserContext(tab_contents()->GetBrowserContext());
+ Profile::FromBrowserContext(web_contents()->GetBrowserContext());
string16 last_search_prepopulate_text =
FindBarState::GetLastPrepopulateText(profile);
@@ -76,7 +77,7 @@
// Keep track of what the last search was across the tabs.
Profile* profile =
- Profile::FromBrowserContext(tab_contents()->GetBrowserContext());
+ Profile::FromBrowserContext(web_contents()->GetBrowserContext());
FindBarState* find_bar_state = profile->GetFindBarState();
find_bar_state->set_last_prepopulate_text(find_text_);
@@ -84,7 +85,7 @@
options.forward = forward_direction;
options.matchCase = case_sensitive;
options.findNext = find_next;
- tab_contents()->GetRenderViewHost()->Find(current_find_request_id_,
+ web_contents()->GetRenderViewHost()->Find(current_find_request_id_,
find_text_, options);
}
@@ -119,7 +120,7 @@
NOTREACHED();
action = content::STOP_FIND_ACTION_KEEP_SELECTION;
}
- tab_contents()->GetRenderViewHost()->StopFinding(action);
+ web_contents()->GetRenderViewHost()->StopFinding(action);
}
void FindTabHelper::HandleFindReply(int request_id,
@@ -148,7 +149,7 @@
final_update);
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
- content::Source<TabContents>(tab_contents()),
+ content::Source<WebContents>(web_contents()),
content::Details<FindNotificationDetails>(&last_search_result_));
}
}
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_controller.cc ('k') | chrome/browser/ui/prefs/prefs_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698