OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This class gathers state related to a single user profile. | 5 // This class gathers state related to a single user profile. |
6 | 6 |
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ | 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ |
8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ | 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 class PersonalDataManager; | 76 class PersonalDataManager; |
77 class PrefProxyConfigTracker; | 77 class PrefProxyConfigTracker; |
78 class PrefService; | 78 class PrefService; |
79 class ProfileSyncFactory; | 79 class ProfileSyncFactory; |
80 class ProfileSyncService; | 80 class ProfileSyncService; |
81 class PromoCounter; | 81 class PromoCounter; |
82 class ProtocolHandlerRegistry; | 82 class ProtocolHandlerRegistry; |
83 class SQLitePersistentCookieStore; | 83 class SQLitePersistentCookieStore; |
84 class SSLConfigServiceManager; | 84 class SSLConfigServiceManager; |
85 class SSLHostState; | 85 class SSLHostState; |
86 class SessionService; | |
87 class SpellCheckHost; | 86 class SpellCheckHost; |
88 class StatusTray; | 87 class StatusTray; |
89 class TabRestoreService; | |
90 class TemplateURLFetcher; | 88 class TemplateURLFetcher; |
91 class TemplateURLModel; | 89 class TemplateURLModel; |
92 class TokenService; | 90 class TokenService; |
93 class TransportSecurityPersister; | 91 class TransportSecurityPersister; |
94 class UserScriptMaster; | 92 class UserScriptMaster; |
95 class UserStyleSheetWatcher; | 93 class UserStyleSheetWatcher; |
96 class VisitedLinkEventListener; | 94 class VisitedLinkEventListener; |
97 class VisitedLinkMaster; | 95 class VisitedLinkMaster; |
98 class WebDataService; | 96 class WebDataService; |
99 class WebKitContext; | 97 class WebKitContext; |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 // Returns the geolocation permission context for this profile. | 384 // Returns the geolocation permission context for this profile. |
387 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0; | 385 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0; |
388 | 386 |
389 // Returns the user style sheet watcher. | 387 // Returns the user style sheet watcher. |
390 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() = 0; | 388 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() = 0; |
391 | 389 |
392 // Returns the find bar state for this profile. The find bar state is lazily | 390 // Returns the find bar state for this profile. The find bar state is lazily |
393 // created the first time that this method is called. | 391 // created the first time that this method is called. |
394 virtual FindBarState* GetFindBarState() = 0; | 392 virtual FindBarState* GetFindBarState() = 0; |
395 | 393 |
396 // Returns the session service for this profile. This may return NULL. If | |
397 // this profile supports a session service (it isn't incognito), and | |
398 // the session service hasn't yet been created, this forces creation of | |
399 // the session service. | |
400 // | |
401 // This returns NULL in two situations: the profile is incognito, or the | |
402 // session service has been explicitly shutdown (browser is exiting). Callers | |
403 // should always check the return value for NULL. | |
404 virtual SessionService* GetSessionService() = 0; | |
405 | |
406 // If this profile has a session service, it is shut down. To properly record | |
407 // the current state this forces creation of the session service, then shuts | |
408 // it down. | |
409 virtual void ShutdownSessionService() = 0; | |
410 | |
411 // Returns true if this profile has a session service. | |
412 virtual bool HasSessionService() const = 0; | |
413 | |
414 // Returns true if this profile has a profile sync service. | 394 // Returns true if this profile has a profile sync service. |
415 virtual bool HasProfileSyncService() const = 0; | 395 virtual bool HasProfileSyncService() const = 0; |
416 | 396 |
417 // Returns true if the last time this profile was open it was exited cleanly. | 397 // Returns true if the last time this profile was open it was exited cleanly. |
418 virtual bool DidLastSessionExitCleanly() = 0; | 398 virtual bool DidLastSessionExitCleanly() = 0; |
419 | 399 |
420 // Returns the BookmarkModel, creating if not yet created. | 400 // Returns the BookmarkModel, creating if not yet created. |
421 virtual BookmarkModel* GetBookmarkModel() = 0; | 401 virtual BookmarkModel* GetBookmarkModel() = 0; |
422 | 402 |
423 // Returns the ProtocolHandlerRegistry, creating if not yet created. | 403 // Returns the ProtocolHandlerRegistry, creating if not yet created. |
(...skipping 18 matching lines...) Expand all Loading... |
442 // or if one profile is the incognito version of another profile (or vice | 422 // or if one profile is the incognito version of another profile (or vice |
443 // versa). | 423 // versa). |
444 virtual bool IsSameProfile(Profile* profile) = 0; | 424 virtual bool IsSameProfile(Profile* profile) = 0; |
445 | 425 |
446 // Returns the time the profile was started. This is not the time the profile | 426 // Returns the time the profile was started. This is not the time the profile |
447 // was created, rather it is the time the user started chrome and logged into | 427 // was created, rather it is the time the user started chrome and logged into |
448 // this profile. For the single profile case, this corresponds to the time | 428 // this profile. For the single profile case, this corresponds to the time |
449 // the user started chrome. | 429 // the user started chrome. |
450 virtual base::Time GetStartTime() const = 0; | 430 virtual base::Time GetStartTime() const = 0; |
451 | 431 |
452 // Returns the TabRestoreService. This returns NULL when incognito. | |
453 virtual TabRestoreService* GetTabRestoreService() = 0; | |
454 | |
455 virtual void ResetTabRestoreService() = 0; | |
456 | |
457 // May return NULL. | 432 // May return NULL. |
458 virtual SpellCheckHost* GetSpellCheckHost() = 0; | 433 virtual SpellCheckHost* GetSpellCheckHost() = 0; |
459 | 434 |
460 // If |force| is false, and the spellchecker is already initialized (or is in | 435 // If |force| is false, and the spellchecker is already initialized (or is in |
461 // the process of initializing), then do nothing. Otherwise clobber the | 436 // the process of initializing), then do nothing. Otherwise clobber the |
462 // current spellchecker and replace it with a new one. | 437 // current spellchecker and replace it with a new one. |
463 virtual void ReinitializeSpellCheckHost(bool force) = 0; | 438 virtual void ReinitializeSpellCheckHost(bool force) = 0; |
464 | 439 |
465 // Returns the WebKitContext assigned to this profile. | 440 // Returns the WebKitContext assigned to this profile. |
466 virtual WebKitContext* GetWebKitContext() = 0; | 441 virtual WebKitContext* GetWebKitContext() = 0; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 bool restored_last_session_; | 570 bool restored_last_session_; |
596 | 571 |
597 // Accessibility events will only be propagated when the pause | 572 // Accessibility events will only be propagated when the pause |
598 // level is zero. PauseAccessibilityEvents and ResumeAccessibilityEvents | 573 // level is zero. PauseAccessibilityEvents and ResumeAccessibilityEvents |
599 // increment and decrement the level, respectively, rather than set it to | 574 // increment and decrement the level, respectively, rather than set it to |
600 // true or false, so that calls can be nested. | 575 // true or false, so that calls can be nested. |
601 int accessibility_pause_level_; | 576 int accessibility_pause_level_; |
602 }; | 577 }; |
603 | 578 |
604 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 579 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
OLD | NEW |