diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.cc | 74 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.h | 86 |
2 files changed, 81 insertions, 79 deletions
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc index 735a48e7..957f32b 100644 --- a/chrome/common/temp_scaffolding_stubs.cc +++ b/chrome/common/temp_scaffolding_stubs.cc @@ -20,6 +20,9 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/pref_service.h" +// static +size_t SessionRestore::num_tabs_to_load_ = 0; + BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line) : main_notification_service_(new NotificationService), memory_model_(HIGH_MEMORY_MODEL), @@ -75,63 +78,6 @@ PrefService* BrowserProcessImpl::local_state() { //-------------------------------------------------------------------------- -static bool s_in_startup = false; - -bool BrowserInit::ProcessCommandLine(const CommandLine& parsed_command_line, - const std::wstring& cur_dir, - PrefService* prefs, bool process_startup, - Profile* profile, int* return_code) { - return LaunchBrowser(parsed_command_line, profile, cur_dir, - process_startup, return_code); -} - -bool BrowserInit::LaunchBrowser(const CommandLine& parsed_command_line, - Profile* profile, const std::wstring& cur_dir, - bool process_startup, int* return_code) { - s_in_startup = process_startup; - bool result = LaunchBrowserImpl(parsed_command_line, profile, cur_dir, - process_startup, return_code); - s_in_startup = false; - return result; -} - -bool BrowserInit::LaunchBrowserImpl(const CommandLine& parsed_command_line, - Profile* profile, - const std::wstring& cur_dir, - bool process_startup, - int* return_code) { - DCHECK(profile); - - // this code is a simplification of BrowserInit::LaunchWithProfile::Launch() - std::vector<GURL> urls_to_open; - urls_to_open.push_back(GURL("http://dev.chromium.org")); - urls_to_open.push_back(GURL("http://crbug.com")); - urls_to_open.push_back(GURL("http://icanhascheezeburger.com")); - Browser* browser = NULL; - browser = OpenURLsInBrowser(browser, profile, urls_to_open); - - return true; -} - -// a simplification of BrowserInit::LaunchWithProfile::OpenURLsInBrowser -Browser* BrowserInit::OpenURLsInBrowser( - Browser* browser, - Profile* profile, - const std::vector<GURL>& urls) { - DCHECK(!urls.empty()); - if (!browser || browser->type() != Browser::TYPE_NORMAL) - browser = Browser::Create(profile); - - for (size_t i = 0; i < urls.size(); ++i) { - browser->AddTabWithURL( - urls[i], GURL(), PageTransition::START_PAGE, (i == 0), NULL); - } - browser->window()->Show(); - return browser; -} - -//-------------------------------------------------------------------------- - UserDataManager* UserDataManager::instance_ = NULL; UserDataManager* UserDataManager::Create() { @@ -157,10 +103,6 @@ bool ShellIntegration::IsDefaultBrowser() { //-------------------------------------------------------------------------- -namespace browser { -void RegisterAllPrefs(PrefService*, PrefService*) { } -} // namespace browser - namespace browser_shutdown { void ReadLastShutdownInfo() { } void Shutdown() { } @@ -253,3 +195,13 @@ BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { return NULL; } #endif + +//-------------------------------------------------------------------------- + +namespace chrome_browser_net { + +void EnableDnsDetailedLog(bool) {} + +void EnableDnsPrefetch(bool) {} + +} // namespace chrome_browser_net diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index 79ea9c5..8dbcfcd 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -37,6 +37,8 @@ class SessionID; class SiteInstance; class SpellChecker; class TabContents; +class TemplateURL; +class TemplateURLRef; class URLRequestContext; class UserScriptMaster; class VisitedLinkMaster; @@ -68,24 +70,6 @@ class MessageWindow { void Unlock() { } }; -class BrowserInit { - public: - static bool ProcessCommandLine(const CommandLine& parsed_command_line, - const std::wstring& cur_dir, - PrefService* prefs, bool process_startup, - Profile* profile, int* return_code); - static bool LaunchBrowser(const CommandLine& parsed_command_line, - Profile* profile, const std::wstring& cur_dir, - bool process_startup, int* return_code); - private: - static bool LaunchBrowserImpl(const CommandLine& parsed_command_line, - Profile* profile, const std::wstring& cur_dir, - bool process_startup, int* return_code); - static Browser* OpenURLsInBrowser(Browser* browser, - Profile* profile, - const std::vector<GURL>& urls); -}; - class FirstRun { public: static bool IsChromeFirstRun() { return false; } @@ -188,6 +172,20 @@ class SessionService : public base::RefCountedThreadSafe<SessionService> { void TabRestored(NavigationController*) { } }; +class SessionRestore { + public: + static void RestoreSession(Profile* profile, + Browser* browser, + bool clobber_existing_window, + bool always_create_tabbed_browser, + const std::vector<GURL>& urls_to_open) {} + static void RestoreSessionSynchronously( + Profile* profile, + const std::vector<GURL>& urls_to_open) {} + + static size_t num_tabs_to_load_; +}; + class TabRestoreService : public base::RefCountedThreadSafe<TabRestoreService> { public: explicit TabRestoreService(Profile* profile) { } @@ -290,6 +288,8 @@ class NavigationController { NavigationEntry* GetActiveEntry() const { return entry_.get(); } void LoadURL(const GURL& url, const GURL& referrer, PageTransition::Type type) { } + static void DisablePromptOnRepost() {} + private: scoped_ptr<NavigationEntry> entry_; }; @@ -306,6 +306,20 @@ class InterstitialPage { virtual void DontProceed() { } }; +class InfoBarDelegate { +}; + +class ConfirmInfoBarDelegate : public InfoBarDelegate { + public: + explicit ConfirmInfoBarDelegate(TabContents* contents) {} + + enum InfoBarButton { + BUTTON_NONE = 0, + BUTTON_OK, + BUTTON_CANCEL + }; +}; + class RenderViewHost { public: bool HasUnloadListener() const { return false; } @@ -333,6 +347,9 @@ class TabContents { static TabContents* CreateWithType(TabContentsType type, Profile* profile, SiteInstance* instance); + void AddInfoBar(InfoBarDelegate* delegate) {} + + Profile* profile() const { return NULL; } private: GURL url_; std::wstring title_; @@ -433,6 +450,30 @@ class SpellChecker : public base::RefCountedThreadSafe<SpellChecker> { const std::wstring& custom_dictionary_file_name) {} }; +class WebAppLauncher { + public: + static void Launch(Profile* profile, const GURL& url) { + } +}; + +class AutocompleteResult { + public: + static void set_max_matches(int) { } +}; + +class AutocompleteProvider { + public: + static void set_max_matches(int) {} +}; + +class URLFixerUpper { + public: + static std::wstring FixupRelativeFile(const std::wstring& base_dir, + const std::wstring& text) { + return L"about:blank"; + } +}; + class TemplateURLModel { public: explicit TemplateURLModel(Profile* profile) { } @@ -440,6 +481,15 @@ class TemplateURLModel { return L""; } static GURL GenerateSearchURL(const TemplateURL* t_url) { return GURL(); } + TemplateURL* GetDefaultSearchProvider() { return NULL; } }; +namespace chrome_browser_net { + +void EnableDnsDetailedLog(bool); + +void EnableDnsPrefetch(bool); + +} // namespace chrome_browser_net + #endif // CHROME_COMMON_TEMP_SCAFFOLDING_STUBS_H_ |