OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | |
11 | 12 |
12 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
13 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
14 | 15 |
15 namespace net { | 16 namespace net { |
16 class URLRequest; | 17 class URLRequest; |
17 } | 18 } |
18 | 19 |
19 namespace content { | 20 namespace content { |
20 | 21 |
(...skipping 23 matching lines...) Expand all Loading... | |
44 // delegate have a longer lifetime than the ResourceDispatcherHost. | 45 // delegate have a longer lifetime than the ResourceDispatcherHost. |
45 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) = 0; | 46 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) = 0; |
46 | 47 |
47 // Controls whether third-party sub-content can pop-up HTTP basic auth | 48 // Controls whether third-party sub-content can pop-up HTTP basic auth |
48 // dialog boxes. | 49 // dialog boxes. |
49 virtual void SetAllowCrossOriginAuthPrompt(bool value) = 0; | 50 virtual void SetAllowCrossOriginAuthPrompt(bool value) = 0; |
50 | 51 |
51 // Clears the ResourceDispatcherHostLoginDelegate associated with the request. | 52 // Clears the ResourceDispatcherHostLoginDelegate associated with the request. |
52 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0; | 53 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0; |
53 | 54 |
55 // Specifies a scheme to be access checked. By default all schemes are | |
56 // allowed | |
Charlie Reis
2016/08/02 20:41:42
nit: End with period.
Also clarify what access ch
ananta
2016/08/02 22:28:28
Done.
| |
57 virtual void AddSchemeForAccessCheck(const std::string& scheme) = 0; | |
58 | |
59 // The following two methods add access information for the url origin | |
60 // passed in. Please note that the scheme has to be registered for access | |
61 // check via a call to the AddSchemeForAccessCheck() method above. | |
62 | |
63 // Adds |process_id| to the list of processes allowed to access the |origin|. | |
64 virtual void AddProcessForOrigin(const ResourceContext* context, | |
65 const std::string& origin, | |
66 int process_id) = 0; | |
67 | |
68 // Removes |process_id| from the list of processes allowed to access the | |
69 // |origin|. | |
70 virtual void RemoveProcessForOrigin(const ResourceContext* context, | |
71 const std::string& origin, | |
72 int process_id) = 0; | |
73 | |
54 protected: | 74 protected: |
55 virtual ~ResourceDispatcherHost() {} | 75 virtual ~ResourceDispatcherHost() {} |
56 }; | 76 }; |
57 | 77 |
58 } // namespace content | 78 } // namespace content |
59 | 79 |
60 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ | 80 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ |
OLD | NEW |