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