| Index: android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h
|
| diff --git a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h
|
| index bc7088c49088f859e2f8d7a3aa83e38b7e750650..48ab0a55e0f5e2d34c0bf893e8f7ffda7e641246 100644
|
| --- a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h
|
| +++ b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h
|
| @@ -5,9 +5,10 @@
|
| #ifndef ANDROID_WEBVIEW_LIB_RENDERER_HOST_AW_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
|
| #define ANDROID_WEBVIEW_LIB_RENDERER_HOST_AW_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
|
|
|
| -#include "content/public/browser/resource_dispatcher_host_delegate.h"
|
| +#include <map>
|
|
|
| #include "base/lazy_instance.h"
|
| +#include "content/public/browser/resource_dispatcher_host_delegate.h"
|
|
|
| namespace content {
|
| class ResourceDispatcherHostLoginDelegate;
|
| @@ -15,6 +16,8 @@ class ResourceDispatcherHostLoginDelegate;
|
|
|
| namespace android_webview {
|
|
|
| +class IoThreadClientThrottle;
|
| +
|
| class AwResourceDispatcherHostDelegate
|
| : public content::ResourceDispatcherHostDelegate {
|
| public:
|
| @@ -42,12 +45,32 @@ class AwResourceDispatcherHostDelegate
|
| int child_id,
|
| int route_id) OVERRIDE;
|
|
|
| + void RemovePendingThrottleOnIoThread(IoThreadClientThrottle* throttle);
|
| +
|
| + static void OnIoThreadClientReady(int new_child_id, int new_route_id);
|
| + static void AddPendingThrottle(int child_id,
|
| + int route_id,
|
| + IoThreadClientThrottle* pending_throttle);
|
| +
|
| private:
|
| friend struct base::DefaultLazyInstanceTraits<
|
| AwResourceDispatcherHostDelegate>;
|
| AwResourceDispatcherHostDelegate();
|
| virtual ~AwResourceDispatcherHostDelegate();
|
|
|
| + // These methods must be called on IO thread.
|
| + void OnIoThreadClientReadyInternal(int child_id, int route_id);
|
| + void AddPendingThrottleOnIoThread(int child_id,
|
| + int route_id,
|
| + IoThreadClientThrottle* pending_throttle);
|
| +
|
| + typedef std::pair<int, int> ChildRouteIDPair;
|
| + typedef std::map<ChildRouteIDPair, IoThreadClientThrottle*>
|
| + PendingThrottleMap;
|
| +
|
| + // Only accessed on the IO thread.
|
| + PendingThrottleMap pending_throttles_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AwResourceDispatcherHostDelegate);
|
| };
|
|
|
|
|