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