summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions/session_service.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 02:52:53 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 02:52:53 +0000
commit6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c (patch)
treea75584b11b8ef188b4eb3376b9146e063823a916 /chrome/browser/sessions/session_service.cc
parentbf3ee201c1ca5112f7fd173fc4785aa52920c5c0 (diff)
downloadchromium_src-6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c.zip
chromium_src-6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c.tar.gz
chromium_src-6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c.tar.bz2
Move NotificationObserver, NotificationSource, and NotificationDetails to content/public/browser.
This patch got way bigger than I wanted, but once I moved NotificationDetails, I figured I might as well mvoe the others since they're in the same files. In hindsight, I should have converted a subset of files at a time by leaving a using statement in the header. BUG=98716 TBR=joi git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106196 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions/session_service.cc')
-rw-r--r--chrome/browser/sessions/session_service.cc33
1 files changed, 19 insertions, 14 deletions
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 94b7050..de031f6 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -33,8 +33,8 @@
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
+#include "content/public/browser/notification_details.h"
#if defined(OS_MACOSX)
#include "chrome/browser/app_controller_cppsafe_mac.h"
@@ -460,7 +460,7 @@ void SessionService::Save() {
&last_updated_save_time_);
NotificationService::current()->Notify(
chrome::NOTIFICATION_SESSION_SERVICE_SAVED,
- Source<Profile>(profile()),
+ content::Source<Profile>(profile()),
NotificationService::NoDetails());
}
}
@@ -523,12 +523,12 @@ bool SessionService::RestoreIfNecessary(const std::vector<GURL>& urls_to_open,
}
void SessionService::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
// All of our messages have the NavigationController as the source.
switch (type) {
case chrome::NOTIFICATION_BROWSER_OPENED: {
- Browser* browser = Source<Browser>(source).ptr();
+ Browser* browser = content::Source<Browser>(source).ptr();
if (browser->profile() != profile() ||
!should_track_changes_for_browser_type(browser->type())) {
return;
@@ -540,7 +540,8 @@ void SessionService::Observe(int type,
}
case content::NOTIFICATION_TAB_PARENTED: {
- TabContentsWrapper* tab = Source<TabContentsWrapper>(source).ptr();
+ TabContentsWrapper* tab =
+ content::Source<TabContentsWrapper>(source).ptr();
if (tab->profile() != profile())
return;
SetTabWindow(tab->restore_tab_helper()->window_id(),
@@ -557,7 +558,8 @@ void SessionService::Observe(int type,
case content::NOTIFICATION_TAB_CLOSED: {
TabContentsWrapper* tab =
TabContentsWrapper::GetCurrentWrapperForContents(
- Source<NavigationController>(source).ptr()->tab_contents());
+ content::Source<NavigationController>(
+ source).ptr()->tab_contents());
if (!tab || tab->profile() != profile())
return;
TabClosed(tab->restore_tab_helper()->window_id(),
@@ -571,10 +573,11 @@ void SessionService::Observe(int type,
case content::NOTIFICATION_NAV_LIST_PRUNED: {
TabContentsWrapper* tab =
TabContentsWrapper::GetCurrentWrapperForContents(
- Source<NavigationController>(source).ptr()->tab_contents());
+ content::Source<NavigationController>(
+ source).ptr()->tab_contents());
if (!tab || tab->profile() != profile())
return;
- Details<content::PrunedDetails> pruned_details(details);
+ content::Details<content::PrunedDetails> pruned_details(details);
if (pruned_details->from_front) {
TabNavigationPathPrunedFromFront(
tab->restore_tab_helper()->window_id(),
@@ -594,10 +597,11 @@ void SessionService::Observe(int type,
case content::NOTIFICATION_NAV_ENTRY_CHANGED: {
TabContentsWrapper* tab =
TabContentsWrapper::GetCurrentWrapperForContents(
- Source<NavigationController>(source).ptr()->tab_contents());
+ content::Source<NavigationController>(
+ source).ptr()->tab_contents());
if (!tab || tab->profile() != profile())
return;
- Details<content::EntryChangedDetails> changed(details);
+ content::Details<content::EntryChangedDetails> changed(details);
UpdateTabNavigation(
tab->restore_tab_helper()->window_id(),
tab->restore_tab_helper()->session_id(),
@@ -608,7 +612,8 @@ void SessionService::Observe(int type,
case content::NOTIFICATION_NAV_ENTRY_COMMITTED: {
TabContentsWrapper* tab =
TabContentsWrapper::GetCurrentWrapperForContents(
- Source<NavigationController>(source).ptr()->tab_contents());
+ content::Source<NavigationController>(
+ source).ptr()->tab_contents());
if (!tab || tab->profile() != profile())
return;
int current_entry_index = tab->controller().GetCurrentEntryIndex();
@@ -620,7 +625,7 @@ void SessionService::Observe(int type,
tab->restore_tab_helper()->session_id(),
current_entry_index,
*tab->controller().GetEntryAtIndex(current_entry_index));
- Details<content::LoadCommittedDetails> changed(details);
+ content::Details<content::LoadCommittedDetails> changed(details);
if (changed->type == content::NAVIGATION_TYPE_NEW_PAGE ||
changed->type == content::NAVIGATION_TYPE_EXISTING_PAGE) {
RecordSessionUpdateHistogramData(
@@ -632,7 +637,7 @@ void SessionService::Observe(int type,
case chrome::NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED: {
ExtensionTabHelper* extension_tab_helper =
- Source<ExtensionTabHelper>(source).ptr();
+ content::Source<ExtensionTabHelper>(source).ptr();
if (extension_tab_helper->tab_contents_wrapper()->profile() != profile())
return;
if (extension_tab_helper->extension_app()) {