Chromium Code Reviews| OLD | NEW | 
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_ | 
| 6 #define CONTENT_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_ | 
| 7 | 7 | 
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" | 
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" | 
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" | 
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 class DownloadManagerDelegate; | 22 class DownloadManagerDelegate; | 
| 23 class ResourceContext; | 23 class ResourceContext; | 
| 24 class ShellDownloadManagerDelegate; | 24 class ShellDownloadManagerDelegate; | 
| 25 class ShellURLRequestContextGetter; | 25 class ShellURLRequestContextGetter; | 
| 26 | 26 | 
| 27 class ShellBrowserContext : public BrowserContext { | 27 class ShellBrowserContext : public BrowserContext { | 
| 28 public: | 28 public: | 
| 29 ShellBrowserContext(bool off_the_record, net::NetLog* net_log); | 29 ShellBrowserContext(bool off_the_record, net::NetLog* net_log); | 
| 30 virtual ~ShellBrowserContext(); | 30 virtual ~ShellBrowserContext(); | 
| 31 | 31 | 
| 32 static void set_guest_manager_delegate_for_testing( | |
| 33 BrowserPluginGuestManagerDelegate* guest_manager_delegate) { | |
| 34 ShellBrowserContext::guest_manager_delegate_ = guest_manager_delegate; | |
| 
 
jam
2014/05/02 22:24:47
why is this a static method?
 
Fady Samuel
2014/05/03 00:16:59
Made it non-static
 
 | |
| 35 } | |
| 36 | |
| 32 // BrowserContext implementation. | 37 // BrowserContext implementation. | 
| 33 virtual base::FilePath GetPath() const OVERRIDE; | 38 virtual base::FilePath GetPath() const OVERRIDE; | 
| 34 virtual bool IsOffTheRecord() const OVERRIDE; | 39 virtual bool IsOffTheRecord() const OVERRIDE; | 
| 35 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE; | 40 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE; | 
| 36 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 41 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 
| 37 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 42 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 
| 38 int renderer_child_id) OVERRIDE; | 43 int renderer_child_id) OVERRIDE; | 
| 39 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; | 44 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; | 
| 40 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( | 45 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( | 
| 41 int renderer_child_id) OVERRIDE; | 46 int renderer_child_id) OVERRIDE; | 
| (...skipping 18 matching lines...) Expand all Loading... | |
| 60 int render_view_id, | 65 int render_view_id, | 
| 61 int bridge_id, | 66 int bridge_id, | 
| 62 int group_id, | 67 int group_id, | 
| 63 const GURL& requesting_frame, | 68 const GURL& requesting_frame, | 
| 64 const ProtectedMediaIdentifierPermissionCallback& callback) OVERRIDE; | 69 const ProtectedMediaIdentifierPermissionCallback& callback) OVERRIDE; | 
| 65 virtual void CancelProtectedMediaIdentifierPermissionRequests( | 70 virtual void CancelProtectedMediaIdentifierPermissionRequests( | 
| 66 int group_id) OVERRIDE; | 71 int group_id) OVERRIDE; | 
| 67 virtual ResourceContext* GetResourceContext() OVERRIDE; | 72 virtual ResourceContext* GetResourceContext() OVERRIDE; | 
| 68 virtual GeolocationPermissionContext* | 73 virtual GeolocationPermissionContext* | 
| 69 GetGeolocationPermissionContext() OVERRIDE; | 74 GetGeolocationPermissionContext() OVERRIDE; | 
| 75 virtual content::BrowserPluginGuestManagerDelegate* | |
| 76 GetGuestManagerDelegate() OVERRIDE; | |
| 70 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 77 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 
| 71 | 78 | 
| 72 net::URLRequestContextGetter* CreateRequestContext( | 79 net::URLRequestContextGetter* CreateRequestContext( | 
| 73 ProtocolHandlerMap* protocol_handlers, | 80 ProtocolHandlerMap* protocol_handlers, | 
| 74 ProtocolHandlerScopedVector protocol_interceptors); | 81 ProtocolHandlerScopedVector protocol_interceptors); | 
| 75 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 82 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 
| 76 const base::FilePath& partition_path, | 83 const base::FilePath& partition_path, | 
| 77 bool in_memory, | 84 bool in_memory, | 
| 78 ProtocolHandlerMap* protocol_handlers, | 85 ProtocolHandlerMap* protocol_handlers, | 
| 79 ProtocolHandlerScopedVector protocol_interceptors); | 86 ProtocolHandlerScopedVector protocol_interceptors); | 
| 80 | 87 | 
| 81 private: | 88 private: | 
| 82 class ShellResourceContext; | 89 class ShellResourceContext; | 
| 83 | 90 | 
| 84 // Performs initialization of the ShellBrowserContext while IO is still | 91 // Performs initialization of the ShellBrowserContext while IO is still | 
| 85 // allowed on the current thread. | 92 // allowed on the current thread. | 
| 86 void InitWhileIOAllowed(); | 93 void InitWhileIOAllowed(); | 
| 87 | 94 | 
| 88 bool off_the_record_; | 95 bool off_the_record_; | 
| 89 net::NetLog* net_log_; | 96 net::NetLog* net_log_; | 
| 90 bool ignore_certificate_errors_; | 97 bool ignore_certificate_errors_; | 
| 91 base::FilePath path_; | 98 base::FilePath path_; | 
| 99 static BrowserPluginGuestManagerDelegate* guest_manager_delegate_; | |
| 
 
jam
2014/05/02 22:24:47
ditto re static
 
Fady Samuel
2014/05/03 00:16:59
Done.
 
 | |
| 92 scoped_ptr<ShellResourceContext> resource_context_; | 100 scoped_ptr<ShellResourceContext> resource_context_; | 
| 93 scoped_ptr<ShellDownloadManagerDelegate> download_manager_delegate_; | 101 scoped_ptr<ShellDownloadManagerDelegate> download_manager_delegate_; | 
| 94 scoped_refptr<ShellURLRequestContextGetter> url_request_getter_; | 102 scoped_refptr<ShellURLRequestContextGetter> url_request_getter_; | 
| 95 | 103 | 
| 96 DISALLOW_COPY_AND_ASSIGN(ShellBrowserContext); | 104 DISALLOW_COPY_AND_ASSIGN(ShellBrowserContext); | 
| 97 }; | 105 }; | 
| 98 | 106 | 
| 99 } // namespace content | 107 } // namespace content | 
| 100 | 108 | 
| 101 #endif // CONTENT_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_ | 109 #endif // CONTENT_SHELL_BROWSER_SHELL_BROWSER_CONTEXT_H_ | 
| OLD | NEW |