diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-12 01:16:30 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-12 01:16:30 +0000 |
commit | bd580a2503917df061b20b1948297650344b931f (patch) | |
tree | 3cbd377b6793e00c8d6f936afdfb10acf6397552 | |
parent | ee550e1f837209fdfdfdfdcf5384d6fb7c49608b (diff) | |
download | chromium_src-bd580a2503917df061b20b1948297650344b931f.zip chromium_src-bd580a2503917df061b20b1948297650344b931f.tar.gz chromium_src-bd580a2503917df061b20b1948297650344b931f.tar.bz2 |
Make tab_restore_service.cc compile on Mac and Linux.
Review URL: http://codereview.chromium.org/23022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9632 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser.cc | 1 | ||||
-rw-r--r-- | chrome/browser/browser.scons | 1 | ||||
-rw-r--r-- | chrome/browser/browsing_data_remover.cc | 2 | ||||
-rw-r--r-- | chrome/browser/profile.cc | 2 | ||||
-rw-r--r-- | chrome/browser/sessions/tab_restore_service.cc | 5 | ||||
-rw-r--r-- | chrome/browser/sessions/tab_restore_service.h | 12 | ||||
-rw-r--r-- | chrome/chrome.xcodeproj/project.pbxproj | 4 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.h | 14 |
8 files changed, 25 insertions, 16 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 6491c56..da7804f 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -16,6 +16,7 @@ #include "chrome/browser/profile.h" #include "chrome/browser/sessions/session_service.h" #include "chrome/browser/sessions/session_types.h" +#include "chrome/browser/sessions/tab_restore_service.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/site_instance.h" diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons index 5929b4c..19ffdac 100644 --- a/chrome/browser/browser.scons +++ b/chrome/browser/browser.scons @@ -745,7 +745,6 @@ if not env.Bit('windows'): 'sessions/base_session_service.cc', 'sessions/session_backend.cc', 'sessions/session_restore.cc', - 'sessions/tab_restore_service.cc', 'shell_integration.cc', 'ssl/ssl_blocking_page.cc', 'ssl/ssl_manager.cc', diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc index d5cadba..2fccb58 100644 --- a/chrome/browser/browsing_data_remover.cc +++ b/chrome/browser/browsing_data_remover.cc @@ -10,6 +10,7 @@ #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/search_engines/template_url_model.h" #include "chrome/browser/sessions/session_service.h" +#include "chrome/browser/sessions/tab_restore_service.h" #include "chrome/browser/webdata/web_data_service.h" #include "chrome/common/notification_service.h" #include "net/base/cookie_monster.h" @@ -27,7 +28,6 @@ // TODO(port): Get rid of this section and finish porting. #if defined(OS_WIN) #include "chrome/browser/download/download_manager.h" -#include "chrome/browser/sessions/tab_restore_service.h" #endif using base::Time; diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index baea4d4..43c44f3 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -20,6 +20,7 @@ #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/search_engines/template_url_model.h" #include "chrome/browser/sessions/session_service.h" +#include "chrome/browser/sessions/tab_restore_service.h" #include "chrome/browser/visitedlink_master.h" #include "chrome/browser/webdata/web_data_service.h" #include "chrome/common/chrome_constants.h" @@ -44,7 +45,6 @@ #include "chrome/browser/download/download_manager.h" #include "chrome/browser/history/history.h" #include "chrome/browser/search_engines/template_url_fetcher.h" -#include "chrome/browser/sessions/tab_restore_service.h" #include "chrome/browser/spellchecker.h" #include "chrome/browser/tab_contents/navigation_controller.h" #endif diff --git a/chrome/browser/sessions/tab_restore_service.cc b/chrome/browser/sessions/tab_restore_service.cc index 54adce1..9a7a5bf 100644 --- a/chrome/browser/sessions/tab_restore_service.cc +++ b/chrome/browser/sessions/tab_restore_service.cc @@ -9,8 +9,8 @@ #include "chrome/browser/browser_list.h" #include "chrome/browser/profile.h" -#include "chrome/browser/sessions/session_backend.h" #include "chrome/browser/sessions/session_service.h" +#include "chrome/browser/sessions/session_command.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/common/scoped_vector.h" @@ -232,7 +232,8 @@ void TabRestoreService::RestoreEntryById(Browser* browser, NavigationController* restored_controller = browser->AddRestoredTab(tab.navigations, browser->tab_count(), tab.current_navigation_index, - (tab_i == window->selected_tab_index)); + (static_cast<int>(tab_i) == + window->selected_tab_index)); if (restored_controller) restored_controller->LoadIfNecessary(); } diff --git a/chrome/browser/sessions/tab_restore_service.h b/chrome/browser/sessions/tab_restore_service.h index 2962cf5..2391224 100644 --- a/chrome/browser/sessions/tab_restore_service.h +++ b/chrome/browser/sessions/tab_restore_service.h @@ -10,10 +10,20 @@ #include "base/observer_list.h" #include "base/time.h" -#include "chrome/browser/sessions/base_session_service.h" #include "chrome/browser/sessions/session_id.h" #include "chrome/browser/sessions/session_types.h" +#if defined(OS_POSIX) +// TODO(port): get rid of this include. It's used just to provide declarations +// and stub definitions for classes we encouter during the porting effort. +#include "chrome/common/temp_scaffolding_stubs.h" +#endif + +// TODO(port): Get rid of this section and finish porting. +#if defined(OS_WIN) +#include "chrome/browser/sessions/base_session_service.h" +#endif + class Browser; class NavigationController; class Profile; diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj index 59f5e21..7cb12a3 100644 --- a/chrome/chrome.xcodeproj/project.pbxproj +++ b/chrome/chrome.xcodeproj/project.pbxproj @@ -75,6 +75,7 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 1C284EB767D0E3D302AC675C /* tab_restore_service.cc in Sources */ = {isa = PBXBuildFile; fileRef = B020A11D500D7519E54F2957 /* tab_restore_service.cc */; }; 331218220F3BFF32006CB2B0 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 331B93A90F3BF2B9008B1C46 /* QuartzCore.framework */; }; 331218230F3BFF36006CB2B0 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 331B93AB0F3BF2DA008B1C46 /* Carbon.framework */; }; 331218290F3C007A006CB2B0 /* renderer_glue.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D640CD80EAE868600EBCFC0 /* renderer_glue.cc */; }; @@ -2420,6 +2421,7 @@ ABFA33750F424E06008FCF5D /* audio_renderer_host.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = audio_renderer_host.h; path = renderer_host/audio_renderer_host.h; sourceTree = "<group>"; }; ABFA33760F424E06008FCF5D /* audio_renderer_host_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = audio_renderer_host_unittest.cc; path = renderer_host/audio_renderer_host_unittest.cc; sourceTree = "<group>"; }; ABFA33790F424EC5008FCF5D /* media.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = media.xcodeproj; path = media/media.xcodeproj; sourceTree = "<group>"; }; + B020A11D500D7519E54F2957 /* tab_restore_service.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = tab_restore_service.cc; path = browser/sessions/tab_restore_service.cc; sourceTree = SOURCE_ROOT; }; B51F6D110F37C4DC00152D66 /* renderer_main_platform_delegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = renderer_main_platform_delegate.h; sourceTree = "<group>"; }; B51F6D120F37C4DC00152D66 /* renderer_main_platform_delegate_win.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = renderer_main_platform_delegate_win.cc; sourceTree = "<group>"; }; B51F6D130F37C4DC00152D66 /* renderer_main_platform_delegate_mac.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = renderer_main_platform_delegate_mac.cc; sourceTree = "<group>"; }; @@ -3045,6 +3047,7 @@ C8D26D9EC81E03E91E270463 /* session_service.cc */, 3D00CDB6C665E7ED1A1090D7 /* bookmark_model.cc */, D941DBEFD8B8B537DE8A4DAE /* bookmark_storage.cc */, + B020A11D500D7519E54F2957 /* tab_restore_service.cc */, ); sourceTree = "<group>"; }; @@ -5347,6 +5350,7 @@ E45075EE0F150ABA003BE099 /* sync_resource_handler.cc in Sources */, E455DDBA0F3227A600DD4383 /* tab_cell.mm in Sources */, E455DCF10F320CFE00DD4383 /* tab_contents_controller.mm in Sources */, + 1C284EB767D0E3D302AC675C /* tab_restore_service.cc in Sources */, E455DCF00F320CF700DD4383 /* tab_strip_controller.mm in Sources */, E46C53A40F2F660900B393B8 /* tab_strip_model.cc in Sources */, E46C53AA0F2F662F00B393B8 /* tab_strip_model_order_controller.cc in Sources */, diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index 5eb9909..9e51a80 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -247,6 +247,10 @@ class BaseSessionService : public CancelableRequestProvider, NOTIMPLEMENTED(); return false; } + bool ShouldTrackEntry(const TabNavigation& navigation) { + NOTIMPLEMENTED(); + return false; + } Handle ScheduleGetLastSessionCommands( InternalGetCommandsRequest* request, CancelableRequestConsumerBase* consumer) { @@ -274,16 +278,6 @@ class SessionRestore { static size_t num_tabs_to_load_; }; -class TabRestoreService : public BaseSessionService { - public: - explicit TabRestoreService(Profile* profile) { } - void BrowserClosing(Browser*) { NOTIMPLEMENTED(); } - void BrowserClosed(Browser*) { NOTIMPLEMENTED(); } - void ClearEntries() { NOTIMPLEMENTED(); } - void CreateHistoricalTab(NavigationController*) { NOTIMPLEMENTED(); } - void RestoreMostRecentEntry(Browser*) { NOTIMPLEMENTED(); } -}; - class MetricsService { public: MetricsService() { } |