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

Unified Diff: chrome/browser/extensions/tab_helper.cc

Issue 10912156: Move SessionID, CaptureVisibleTabFunction to WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase atop the extension tab helper change Created 8 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
« no previous file with comments | « chrome/browser/extensions/script_badge_controller.cc ('k') | chrome/browser/sessions/session_id.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/tab_helper.cc
diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc
index bfe97b85a7fce95060255b87dea826e95c0598ec..863b06d4c9738308afa45288f3f8dec817d98307 100644
--- a/chrome/browser/extensions/tab_helper.cc
+++ b/chrome/browser/extensions/tab_helper.cc
@@ -64,7 +64,7 @@ TabHelper::TabHelper(content::WebContents* web_contents)
script_executor_(web_contents),
active_tab_permission_manager_(
web_contents,
- SessionID::IdForTab(TabContents::FromWebContents(web_contents)),
+ SessionID::IdForTab(web_contents),
Profile::FromBrowserContext(web_contents->GetBrowserContext())) {
if (switch_utils::AreScriptBadgesEnabled()) {
location_bar_controller_.reset(
@@ -137,10 +137,9 @@ SkBitmap* TabHelper::GetExtensionAppIcon() {
}
void TabHelper::RenderViewCreated(RenderViewHost* render_view_host) {
- TabContents* tab_contents = TabContents::FromWebContents(web_contents());
render_view_host->Send(
new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(),
- SessionID::IdForTab(tab_contents)));
+ SessionID::IdForTab(web_contents())));
}
void TabHelper::DidNavigateMainFrame(
@@ -155,12 +154,11 @@ void TabHelper::DidNavigateMainFrame(
if (!service)
return;
- TabContents* tab_contents = TabContents::FromWebContents(web_contents());
for (ExtensionSet::const_iterator it = service->extensions()->begin();
it != service->extensions()->end(); ++it) {
ExtensionAction* browser_action = (*it)->browser_action();
if (browser_action) {
- browser_action->ClearAllValuesForTab(SessionID::IdForTab(tab_contents));
+ browser_action->ClearAllValuesForTab(SessionID::IdForTab(web_contents()));
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
content::Source<ExtensionAction>(browser_action),
« no previous file with comments | « chrome/browser/extensions/script_badge_controller.cc ('k') | chrome/browser/sessions/session_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698