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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 virtual const Extension* GetTheme() = 0; | 339 virtual const Extension* GetTheme() = 0; |
340 | 340 |
341 // Returns or creates the ThemeProvider associated with this profile | 341 // Returns or creates the ThemeProvider associated with this profile |
342 virtual BrowserThemeProvider* GetThemeProvider() = 0; | 342 virtual BrowserThemeProvider* GetThemeProvider() = 0; |
343 | 343 |
344 // Returns the request context information associated with this profile. Call | 344 // Returns the request context information associated with this profile. Call |
345 // this only on the UI thread, since it can send notifications that should | 345 // this only on the UI thread, since it can send notifications that should |
346 // happen on the UI thread. | 346 // happen on the UI thread. |
347 virtual URLRequestContextGetter* GetRequestContext() = 0; | 347 virtual URLRequestContextGetter* GetRequestContext() = 0; |
348 | 348 |
| 349 // Returns the request context appropriate for the given app. If installed_app |
| 350 // is null or installed_app->is_storage_isolated() returns false, this is |
| 351 // equivalent to calling GetRequestContext(). |
| 352 // TODO(creis): After isolated app storage is no longer an experimental |
| 353 // feature, consider making this the default contract for GetRequestContext. |
| 354 virtual URLRequestContextGetter* GetRequestContextForPossibleApp( |
| 355 const Extension* installed_app) = 0; |
| 356 |
349 // Returns the request context for media resources asociated with this | 357 // Returns the request context for media resources asociated with this |
350 // profile. | 358 // profile. |
351 virtual URLRequestContextGetter* GetRequestContextForMedia() = 0; | 359 virtual URLRequestContextGetter* GetRequestContextForMedia() = 0; |
352 | 360 |
353 // Returns the request context used for extension-related requests. This | 361 // Returns the request context used for extension-related requests. This |
354 // is only used for a separate cookie store currently. | 362 // is only used for a separate cookie store currently. |
355 virtual URLRequestContextGetter* GetRequestContextForExtensions() = 0; | 363 virtual URLRequestContextGetter* GetRequestContextForExtensions() = 0; |
356 | 364 |
| 365 // Returns the request context used within an installed app that has |
| 366 // requested isolated storage. |
| 367 virtual URLRequestContextGetter* GetRequestContextForIsolatedApp( |
| 368 const std::string& app_id) = 0; |
| 369 |
357 // Called by the ExtensionService that lives in this profile. Gives the | 370 // Called by the ExtensionService that lives in this profile. Gives the |
358 // profile a chance to react to the load event before the EXTENSION_LOADED | 371 // profile a chance to react to the load event before the EXTENSION_LOADED |
359 // notification has fired. The purpose for handling this event first is to | 372 // notification has fired. The purpose for handling this event first is to |
360 // avoid race conditions by making sure URLRequestContexts learn about new | 373 // avoid race conditions by making sure URLRequestContexts learn about new |
361 // extensions before anything else needs them to know. | 374 // extensions before anything else needs them to know. |
362 virtual void RegisterExtensionWithRequestContexts( | 375 virtual void RegisterExtensionWithRequestContexts( |
363 const Extension* extension) {} | 376 const Extension* extension) {} |
364 | 377 |
365 // Called by the ExtensionService that lives in this profile. Lets the | 378 // Called by the ExtensionService that lives in this profile. Lets the |
366 // profile clean up its RequestContexts once all the listeners to the | 379 // profile clean up its RequestContexts once all the listeners to the |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 bool restored_last_session_; | 613 bool restored_last_session_; |
601 | 614 |
602 // Accessibility events will only be propagated when the pause | 615 // Accessibility events will only be propagated when the pause |
603 // level is zero. PauseAccessibilityEvents and ResumeAccessibilityEvents | 616 // level is zero. PauseAccessibilityEvents and ResumeAccessibilityEvents |
604 // increment and decrement the level, respectively, rather than set it to | 617 // increment and decrement the level, respectively, rather than set it to |
605 // true or false, so that calls can be nested. | 618 // true or false, so that calls can be nested. |
606 int accessibility_pause_level_; | 619 int accessibility_pause_level_; |
607 }; | 620 }; |
608 | 621 |
609 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 622 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
OLD | NEW |