summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sidebar
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-01 14:30:39 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-01 14:30:39 +0000
commit4c1865ad4cd7176d6bea8b3632872e8dd4e19c51 (patch)
tree749993bd283c2ca64f4460cefcb32a64760c079b /chrome/browser/sidebar
parent68bec8591fedbe3db84cf38d1deae260412c1751 (diff)
downloadchromium_src-4c1865ad4cd7176d6bea8b3632872e8dd4e19c51.zip
chromium_src-4c1865ad4cd7176d6bea8b3632872e8dd4e19c51.tar.gz
chromium_src-4c1865ad4cd7176d6bea8b3632872e8dd4e19c51.tar.bz2
Removal of Profile from content part 4.
BUG=76788 TEST=no change visible Review URL: http://codereview.chromium.org/7531004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94901 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sidebar')
-rw-r--r--chrome/browser/sidebar/sidebar_manager.cc20
1 files changed, 14 insertions, 6 deletions
diff --git a/chrome/browser/sidebar/sidebar_manager.cc b/chrome/browser/sidebar/sidebar_manager.cc
index 0398ba5..c00a5b4 100644
--- a/chrome/browser/sidebar/sidebar_manager.cc
+++ b/chrome/browser/sidebar/sidebar_manager.cc
@@ -87,16 +87,22 @@ void SidebarManager::NotifyStateChanges(
FindSidebarContainerFor(active_sidebar_contents);
if (was_active_host != NULL) {
+ Profile* profile = Profile::FromBrowserContext(
+ was_active_sidebar_contents->browser_context());
ExtensionSidebarEventRouter::OnStateChanged(
- was_active_sidebar_contents->profile(),
- was_active_host->tab_contents(), was_active_host->content_id(),
+ profile,
+ was_active_host->tab_contents(),
+ was_active_host->content_id(),
extension_sidebar_constants::kShownState);
}
if (active_host != NULL) {
+ Profile* profile = Profile::FromBrowserContext(
+ active_sidebar_contents->browser_context());
ExtensionSidebarEventRouter::OnStateChanged(
- active_sidebar_contents->profile(),
- active_host->tab_contents(), active_host->content_id(),
+ profile,
+ active_host->tab_contents(),
+ active_host->content_id(),
extension_sidebar_constants::kActiveState);
}
}
@@ -115,8 +121,9 @@ void SidebarManager::ShowSidebar(TabContents* tab,
host->Show();
+ Profile* profile = Profile::FromBrowserContext(tab->browser_context());
ExtensionSidebarEventRouter::OnStateChanged(
- tab->profile(), tab, content_id,
+ profile, tab, content_id,
extension_sidebar_constants::kShownState);
}
@@ -172,8 +179,9 @@ void SidebarManager::HideSidebar(TabContents* tab,
UnregisterSidebarContainerFor(tab, content_id);
+ Profile* profile = Profile::FromBrowserContext(tab->browser_context());
ExtensionSidebarEventRouter::OnStateChanged(
- tab->profile(), tab, content_id,
+ profile, tab, content_id,
extension_sidebar_constants::kHiddenState);
}