| 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 ANDROID_WEBVIEW_LIB_RENDERER_HOST_AW_RESOURCE_DISPATCHER_HOST_DELEGATE_H
_ | 5 #ifndef ANDROID_WEBVIEW_LIB_RENDERER_HOST_AW_RESOURCE_DISPATCHER_HOST_DELEGATE_H
_ |
| 6 #define ANDROID_WEBVIEW_LIB_RENDERER_HOST_AW_RESOURCE_DISPATCHER_HOST_DELEGATE_H
_ | 6 #define ANDROID_WEBVIEW_LIB_RENDERER_HOST_AW_RESOURCE_DISPATCHER_HOST_DELEGATE_H
_ |
| 7 | 7 |
| 8 #include "content/public/browser/resource_dispatcher_host_delegate.h" | 8 #include "content/public/browser/resource_dispatcher_host_delegate.h" |
| 9 | 9 |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 class ResourceDispatcherHostLoginDelegate; | 13 class ResourceDispatcherHostLoginDelegate; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace android_webview { | 16 namespace android_webview { |
| 17 | 17 |
| 18 class AwResourceDispatcherHostDelegate | 18 class AwResourceDispatcherHostDelegate |
| 19 : public content::ResourceDispatcherHostDelegate { | 19 : public content::ResourceDispatcherHostDelegate { |
| 20 public: | 20 public: |
| 21 static void ResourceDispatcherHostCreated(); | 21 static void ResourceDispatcherHostCreated(); |
| 22 | 22 |
| 23 // Overriden methods from ResourceDispatcherHostDelegate. | 23 // Overriden methods from ResourceDispatcherHostDelegate. |
| 24 virtual void RequestBeginning( | 24 virtual void RequestBeginning( |
| 25 net::URLRequest* request, | 25 net::URLRequest* request, |
| 26 content::ResourceContext* resource_context, | 26 content::ResourceContext* resource_context, |
| 27 appcache::AppCacheService* appcache_service, |
| 27 ResourceType::Type resource_type, | 28 ResourceType::Type resource_type, |
| 28 int child_id, | 29 int child_id, |
| 29 int route_id, | 30 int route_id, |
| 30 bool is_continuation_of_transferred_request, | 31 bool is_continuation_of_transferred_request, |
| 31 ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE; | 32 ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE; |
| 32 | 33 |
| 33 virtual bool AcceptAuthRequest(net::URLRequest* request, | 34 virtual bool AcceptAuthRequest(net::URLRequest* request, |
| 34 net::AuthChallengeInfo* auth_info) OVERRIDE; | 35 net::AuthChallengeInfo* auth_info) OVERRIDE; |
| 35 | 36 |
| 36 virtual content::ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( | 37 virtual content::ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( |
| 37 net::AuthChallengeInfo* auth_info, | 38 net::AuthChallengeInfo* auth_info, |
| 38 net::URLRequest* request) OVERRIDE; | 39 net::URLRequest* request) OVERRIDE; |
| 39 | 40 |
| 40 private: | 41 private: |
| 41 friend struct base::DefaultLazyInstanceTraits< | 42 friend struct base::DefaultLazyInstanceTraits< |
| 42 AwResourceDispatcherHostDelegate>; | 43 AwResourceDispatcherHostDelegate>; |
| 43 AwResourceDispatcherHostDelegate(); | 44 AwResourceDispatcherHostDelegate(); |
| 44 virtual ~AwResourceDispatcherHostDelegate(); | 45 virtual ~AwResourceDispatcherHostDelegate(); |
| 45 | 46 |
| 46 DISALLOW_COPY_AND_ASSIGN(AwResourceDispatcherHostDelegate); | 47 DISALLOW_COPY_AND_ASSIGN(AwResourceDispatcherHostDelegate); |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 } // namespace android_webview | 50 } // namespace android_webview |
| 50 | 51 |
| 51 #endif // ANDROID_WEBVIEW_LIB_RENDERER_HOST_AW_RESOURCE_DISPATCHER_HOST_H_ | 52 #endif // ANDROID_WEBVIEW_LIB_RENDERER_HOST_AW_RESOURCE_DISPATCHER_HOST_H_ |
| OLD | NEW |