| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 SKY_VIEWER_PLATFORM_WEBURLLOADER_IMPL_H_ | 5 #ifndef SKY_VIEWER_PLATFORM_WEBURLLOADER_IMPL_H_ |
| 6 #define SKY_VIEWER_PLATFORM_WEBURLLOADER_IMPL_H_ | 6 #define SKY_VIEWER_PLATFORM_WEBURLLOADER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "mojo/common/handle_watcher.h" | 9 #include "mojo/common/handle_watcher.h" |
| 10 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" | 10 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" |
| 11 #include "sky/engine/public/platform/WebURLLoader.h" | 11 #include "sky/engine/public/platform/WebURLLoader.h" |
| 12 #include "sky/engine/public/platform/WebURLRequest.h" | 12 #include "sky/engine/public/platform/WebURLRequest.h" |
| 13 | 13 |
| 14 namespace mojo { | 14 namespace mojo { |
| 15 class NetworkService; | 15 class NetworkService; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace sky { | 18 namespace sky { |
| 19 // The concrete type of WebURLRequest::ExtraData. | |
| 20 class WebURLRequestExtraData : public blink::WebURLRequest::ExtraData { | |
| 21 public: | |
| 22 WebURLRequestExtraData(); | |
| 23 virtual ~WebURLRequestExtraData(); | |
| 24 | |
| 25 mojo::URLResponsePtr synthetic_response; | |
| 26 }; | |
| 27 | 19 |
| 28 class WebURLLoaderImpl : public blink::WebURLLoader { | 20 class WebURLLoaderImpl : public blink::WebURLLoader { |
| 29 public: | 21 public: |
| 30 explicit WebURLLoaderImpl(mojo::NetworkService* network_service); | 22 explicit WebURLLoaderImpl(mojo::NetworkService* network_service); |
| 31 | 23 |
| 32 private: | 24 private: |
| 33 virtual ~WebURLLoaderImpl(); | 25 virtual ~WebURLLoaderImpl(); |
| 34 | 26 |
| 35 // blink::WebURLLoader methods: | 27 // blink::WebURLLoader methods: |
| 36 virtual void loadAsynchronously( | 28 virtual void loadAsynchronously( |
| (...skipping 14 matching lines...) Expand all Loading... |
| 51 mojo::common::HandleWatcher handle_watcher_; | 43 mojo::common::HandleWatcher handle_watcher_; |
| 52 | 44 |
| 53 base::WeakPtrFactory<WebURLLoaderImpl> weak_factory_; | 45 base::WeakPtrFactory<WebURLLoaderImpl> weak_factory_; |
| 54 | 46 |
| 55 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); | 47 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); |
| 56 }; | 48 }; |
| 57 | 49 |
| 58 } // namespace sky | 50 } // namespace sky |
| 59 | 51 |
| 60 #endif // SKY_VIEWER_PLATFORM_WEBURLLOADER_IMPL_H_ | 52 #endif // SKY_VIEWER_PLATFORM_WEBURLLOADER_IMPL_H_ |
| OLD | NEW |