| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 ScopedVector<ResourceThrottle>* throttles); | 77 ScopedVector<ResourceThrottle>* throttles); |
| 78 | 78 |
| 79 // Creates a ResourceDispatcherHostLoginDelegate that asks the user for a | 79 // Creates a ResourceDispatcherHostLoginDelegate that asks the user for a |
| 80 // username and password. | 80 // username and password. |
| 81 virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( | 81 virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( |
| 82 net::AuthChallengeInfo* auth_info, net::URLRequest* request); | 82 net::AuthChallengeInfo* auth_info, net::URLRequest* request); |
| 83 | 83 |
| 84 // Launches the url for the given tab. Returns true if an attempt to handle | 84 // Launches the url for the given tab. Returns true if an attempt to handle |
| 85 // the url was made, e.g. by launching an app. Note that this does not | 85 // the url was made, e.g. by launching an app. Note that this does not |
| 86 // guarantee that the app successfully handled it. | 86 // guarantee that the app successfully handled it. |
| 87 // Some external protocol handlers only run in the context of a user gesture, |
| 88 // so initiated_by_user_gesture should be passed accordingly. |
| 87 virtual bool HandleExternalProtocol(const GURL& url, | 89 virtual bool HandleExternalProtocol(const GURL& url, |
| 88 int child_id, | 90 int child_id, |
| 89 int route_id); | 91 int route_id, |
| 92 bool initiated_by_user_gesture); |
| 90 | 93 |
| 91 // Returns true if we should force the given resource to be downloaded. | 94 // Returns true if we should force the given resource to be downloaded. |
| 92 // Otherwise, the content layer decides. | 95 // Otherwise, the content layer decides. |
| 93 virtual bool ShouldForceDownloadResource( | 96 virtual bool ShouldForceDownloadResource( |
| 94 const GURL& url, const std::string& mime_type); | 97 const GURL& url, const std::string& mime_type); |
| 95 | 98 |
| 96 // Returns true and sets |origin| and |target_id| if a Stream should be | 99 // Returns true and sets |origin| and |target_id| if a Stream should be |
| 97 // created for the resource. | 100 // created for the resource. |
| 98 // If true is returned, a new Stream will be created and OnStreamCreated() | 101 // If true is returned, a new Stream will be created and OnStreamCreated() |
| 99 // will be called with | 102 // will be called with |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 virtual void RequestComplete(net::URLRequest* url_request); | 141 virtual void RequestComplete(net::URLRequest* url_request); |
| 139 | 142 |
| 140 protected: | 143 protected: |
| 141 ResourceDispatcherHostDelegate(); | 144 ResourceDispatcherHostDelegate(); |
| 142 virtual ~ResourceDispatcherHostDelegate(); | 145 virtual ~ResourceDispatcherHostDelegate(); |
| 143 }; | 146 }; |
| 144 | 147 |
| 145 } // namespace content | 148 } // namespace content |
| 146 | 149 |
| 147 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 150 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| OLD | NEW |