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

Side by Side Diff: chrome/common/temp_scaffolding_stubs.h

Issue 19024: Reverting 8722,8721. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome.xcodeproj/project.pbxproj ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_COMMON_TEMP_SCAFFOLDING_STUBS_H_ 5 #ifndef CHROME_COMMON_TEMP_SCAFFOLDING_STUBS_H_
6 #define CHROME_COMMON_TEMP_SCAFFOLDING_STUBS_H_ 6 #define CHROME_COMMON_TEMP_SCAFFOLDING_STUBS_H_
7 7
8 // This file provides declarations and stub definitions for classes we encouter 8 // This file provides declarations and stub definitions for classes we encouter
9 // during the porting effort. It is not meant to be perminent, and classes will 9 // during the porting effort. It is not meant to be perminent, and classes will
10 // be removed from here as they are fleshed out more completely. 10 // be removed from here as they are fleshed out more completely.
11 11
12 #include <string> 12 #include <string>
13 13
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "base/ref_counted.h" 15 #include "base/ref_counted.h"
16 #include "base/gfx/rect.h" 16 #include "base/gfx/rect.h"
17 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
18 #include "chrome/browser/tab_contents/tab_contents_type.h" 18 #include "chrome/browser/tab_contents/tab_contents_type.h"
19 #include "chrome/common/page_transition_types.h" 19 #include "chrome/common/page_transition_types.h"
20 #include "googleurl/src/gurl.h" 20 #include "googleurl/src/gurl.h"
21 #include "skia/include/SkBitmap.h" 21 #include "skia/include/SkBitmap.h"
22 #include "webkit/glue/window_open_disposition.h" 22 #include "webkit/glue/window_open_disposition.h"
23 23
24 class Browser; 24 class Browser;
25 class BookmarkService;
26 class CommandLine; 25 class CommandLine;
27 class HistoryService;
28 class MetricsService; 26 class MetricsService;
29 class NavigationEntry; 27 class NavigationEntry;
30 class ProfileManager; 28 class ProfileManager;
31 class Profile; 29 class Profile;
32 class SessionID; 30 class SessionID;
33 class SpellChecker;
34 class TabContents; 31 class TabContents;
35 class URLRequestContext; 32 class URLRequestContext;
36 class UserScriptMaster;
37 class VisitedLinkMaster;
38 class WebContents; 33 class WebContents;
39 34
40 //--------------------------------------------------------------------------- 35 //---------------------------------------------------------------------------
41 // These stubs are for Browser_main() 36 // These stubs are for Browser_main()
42 37
43 class Upgrade { 38 class Upgrade {
44 public: 39 public:
45 static bool IsBrowserAlreadyRunning() { return false; } 40 static bool IsBrowserAlreadyRunning() { return false; }
46 static bool RelaunchChromeBrowser(const CommandLine& command_line) { 41 static bool RelaunchChromeBrowser(const CommandLine& command_line) {
47 return true; 42 return true;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 void WindowClosed(const SessionID &) { } 168 void WindowClosed(const SessionID &) { }
174 void SetWindowBounds(const SessionID&, const gfx::Rect&, bool) { } 169 void SetWindowBounds(const SessionID&, const gfx::Rect&, bool) { }
175 }; 170 };
176 171
177 class TabRestoreService { 172 class TabRestoreService {
178 public: 173 public:
179 void BrowserClosing(Browser*) { } 174 void BrowserClosing(Browser*) { }
180 void BrowserClosed(Browser*) { } 175 void BrowserClosed(Browser*) { }
181 }; 176 };
182 177
183 class HistoryService {
184 public:
185
186 class URLEnumerator {
187 public:
188 virtual ~URLEnumerator() {}
189 virtual void OnURL(const GURL& url) = 0;
190 virtual void OnComplete(bool success) = 0;
191 };
192
193 HistoryService() {}
194 bool Init(const std::wstring& history_dir, BookmarkService* bookmark_service)
195 { return false; }
196 void SetOnBackendDestroyTask(Task*) {}
197 void AddPage(GURL const&, void const*, int, GURL const&,
198 int, std::vector<GURL> const&) {}
199 void AddPage(const GURL& url) {}
200 void SetPageContents(const GURL& url, const std::wstring& contents) {}
201 void IterateURLs(URLEnumerator* iterator) {}
202 void Cleanup() {}
203 void AddRef() {}
204 void Release() {}
205 };
206
207 class Profile { 178 class Profile {
208 public: 179 public:
209 enum ServiceAccessType {
210 EXPLICIT_ACCESS,
211 IMPLICIT_ACCESS
212 };
213
214 public:
215 Profile(const std::wstring& user_data_dir); 180 Profile(const std::wstring& user_data_dir);
216 virtual std::wstring GetPath() { return path_; } 181 virtual std::wstring GetPath() { return path_; }
217 virtual PrefService* GetPrefs(); 182 virtual PrefService* GetPrefs();
218 void ResetTabRestoreService() { } 183 void ResetTabRestoreService() { }
219 SpellChecker* GetSpellChecker() { return NULL; }
220 VisitedLinkMaster* GetVisitedLinkMaster() { return NULL; }
221 TabRestoreService* GetTabRestoreService() { return NULL; } 184 TabRestoreService* GetTabRestoreService() { return NULL; }
222 SessionService* GetSessionService() { return NULL; } 185 SessionService* GetSessionService() { return NULL; }
223 UserScriptMaster* GetUserScriptMaster() { return NULL; }
224 bool IsOffTheRecord() { return false; } 186 bool IsOffTheRecord() { return false; }
225 URLRequestContext* GetRequestContext() { return NULL; } 187 URLRequestContext* GetRequestContext() { return NULL; }
226 virtual Profile* GetOriginalProfile() { return this; } 188 virtual Profile* GetOriginalProfile() { return this; }
227 virtual Profile* GetOffTheRecordProfile() { return this; } 189 virtual Profile* GetOffTheRecordProfile() { return this; }
228 bool HasSessionService() { return false; } 190 bool HasSessionService() { return false; }
229 std::wstring GetID() { return L""; }
230 HistoryService* GetHistoryService(ServiceAccessType access) {
231 return &history_service_;
232 }
233
234 private: 191 private:
235 std::wstring GetPrefFilePath(); 192 std::wstring GetPrefFilePath();
236 193
237 std::wstring path_; 194 std::wstring path_;
238 scoped_ptr<PrefService> prefs_; 195 scoped_ptr<PrefService> prefs_;
239 HistoryService history_service_;
240 }; 196 };
241 197
242 class ProfileManager : NonThreadSafe { 198 class ProfileManager : NonThreadSafe {
243 public: 199 public:
244 ProfileManager() { } 200 ProfileManager() { }
245 virtual ~ProfileManager() { } 201 virtual ~ProfileManager() { }
246 Profile* GetDefaultProfile(const std::wstring& user_data_dir); 202 Profile* GetDefaultProfile(const std::wstring& user_data_dir);
247 static std::wstring GetDefaultProfileDir(const std::wstring& user_data_dir); 203 static std::wstring GetDefaultProfileDir(const std::wstring& user_data_dir);
248 static std::wstring GetDefaultProfilePath(const std::wstring& profile_dir); 204 static std::wstring GetDefaultProfilePath(const std::wstring& profile_dir);
249 static void ShutdownSessionServices() { } 205 static void ShutdownSessionServices() { }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 384
429 class WindowSizer { 385 class WindowSizer {
430 public: 386 public:
431 static void GetBrowserWindowBounds(const std::wstring& app_name, 387 static void GetBrowserWindowBounds(const std::wstring& app_name,
432 const gfx::Rect& specified_bounds, 388 const gfx::Rect& specified_bounds,
433 gfx::Rect* window_bounds, 389 gfx::Rect* window_bounds,
434 bool* maximized) { } 390 bool* maximized) { }
435 }; 391 };
436 392
437 #endif // CHROME_COMMON_TEMP_SCAFFOLDING_STUBS_H_ 393 #endif // CHROME_COMMON_TEMP_SCAFFOLDING_STUBS_H_
OLDNEW
« no previous file with comments | « chrome/chrome.xcodeproj/project.pbxproj ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698