| 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 MOJO_EXAMPLE_HTML_VIEWER_WEBURLLOADER_IMPL_H_ | 5 #ifndef MOJO_SERVICES_HTML_VIEWER_WEBURLLOADER_IMPL_H_ |
| 6 #define MOJO_EXAMPLE_HTML_VIEWER_WEBURLLOADER_IMPL_H_ | 6 #define MOJO_SERVICES_HTML_VIEWER_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/public/interfaces/network/url_loader.mojom.h" | 10 #include "mojo/services/public/interfaces/network/url_loader.mojom.h" |
| 11 #include "third_party/WebKit/public/platform/WebURLLoader.h" | 11 #include "third_party/WebKit/public/platform/WebURLLoader.h" |
| 12 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 12 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 13 | 13 |
| 14 namespace mojo { | 14 namespace mojo { |
| 15 class NetworkService; | 15 class NetworkService; |
| 16 | 16 |
| 17 namespace examples { | |
| 18 | |
| 19 // The concrete type of WebURLRequest::ExtraData. | 17 // The concrete type of WebURLRequest::ExtraData. |
| 20 class WebURLRequestExtraData : public blink::WebURLRequest::ExtraData { | 18 class WebURLRequestExtraData : public blink::WebURLRequest::ExtraData { |
| 21 public: | 19 public: |
| 22 WebURLRequestExtraData(); | 20 WebURLRequestExtraData(); |
| 23 virtual ~WebURLRequestExtraData(); | 21 virtual ~WebURLRequestExtraData(); |
| 24 | 22 |
| 25 URLResponsePtr synthetic_response; | 23 URLResponsePtr synthetic_response; |
| 26 }; | 24 }; |
| 27 | 25 |
| 28 class WebURLLoaderImpl : public blink::WebURLLoader { | 26 class WebURLLoaderImpl : public blink::WebURLLoader { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 52 GURL url_; | 50 GURL url_; |
| 53 URLLoaderPtr url_loader_; | 51 URLLoaderPtr url_loader_; |
| 54 ScopedDataPipeConsumerHandle response_body_stream_; | 52 ScopedDataPipeConsumerHandle response_body_stream_; |
| 55 common::HandleWatcher handle_watcher_; | 53 common::HandleWatcher handle_watcher_; |
| 56 | 54 |
| 57 base::WeakPtrFactory<WebURLLoaderImpl> weak_factory_; | 55 base::WeakPtrFactory<WebURLLoaderImpl> weak_factory_; |
| 58 | 56 |
| 59 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); | 57 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); |
| 60 }; | 58 }; |
| 61 | 59 |
| 62 } // namespace examples | |
| 63 } // namespace mojo | 60 } // namespace mojo |
| 64 | 61 |
| 65 #endif // MOJO_EXAMPLE_HTML_VIEWER_WEBURLLOADER_IMPL_H_ | 62 #endif // MOJO_SERVICES_HTML_VIEWER_WEBURLLOADER_IMPL_H_ |
| OLD | NEW |