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_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // page is shown. If true is returned, the user will be prompted for | 88 // page is shown. If true is returned, the user will be prompted for |
89 // authentication credentials. | 89 // authentication credentials. |
90 virtual bool AcceptAuthRequest(net::URLRequest* request, | 90 virtual bool AcceptAuthRequest(net::URLRequest* request, |
91 net::AuthChallengeInfo* auth_info); | 91 net::AuthChallengeInfo* auth_info); |
92 | 92 |
93 // Creates a ResourceDispatcherHostLoginDelegate that asks the user for a | 93 // Creates a ResourceDispatcherHostLoginDelegate that asks the user for a |
94 // username and password. | 94 // username and password. |
95 virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( | 95 virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( |
96 net::AuthChallengeInfo* auth_info, net::URLRequest* request); | 96 net::AuthChallengeInfo* auth_info, net::URLRequest* request); |
97 | 97 |
98 // Launches the url for the given tab. | 98 // Launches the url for the given tab. Returns true if an attempt to handle |
99 virtual void HandleExternalProtocol(const GURL& url, | 99 // the url was made, e.g. by launching an app. Note that this does not |
| 100 // guarantee that the app successfully handled it. |
| 101 virtual bool HandleExternalProtocol(const GURL& url, |
100 int child_id, | 102 int child_id, |
101 int route_id); | 103 int route_id); |
102 | 104 |
103 // Returns true if we should force the given resource to be downloaded. | 105 // Returns true if we should force the given resource to be downloaded. |
104 // Otherwise, the content layer decides. | 106 // Otherwise, the content layer decides. |
105 virtual bool ShouldForceDownloadResource( | 107 virtual bool ShouldForceDownloadResource( |
106 const GURL& url, const std::string& mime_type); | 108 const GURL& url, const std::string& mime_type); |
107 | 109 |
108 // Informs the delegate that a response has started. | 110 // Informs the delegate that a response has started. |
109 virtual void OnResponseStarted( | 111 virtual void OnResponseStarted( |
(...skipping 10 matching lines...) Expand all Loading... |
120 ResourceResponse* response); | 122 ResourceResponse* response); |
121 | 123 |
122 protected: | 124 protected: |
123 ResourceDispatcherHostDelegate(); | 125 ResourceDispatcherHostDelegate(); |
124 virtual ~ResourceDispatcherHostDelegate(); | 126 virtual ~ResourceDispatcherHostDelegate(); |
125 }; | 127 }; |
126 | 128 |
127 } // namespace content | 129 } // namespace content |
128 | 130 |
129 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 131 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
OLD | NEW |