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