Chromium Code Reviews| 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_SERVICES_HTML_VIEWER_WEBURLLOADER_IMPL_H_ | 5 #ifndef MOJO_SERVICES_HTML_VIEWER_WEBURLLOADER_IMPL_H_ |
| 6 #define MOJO_SERVICES_HTML_VIEWER_WEBURLLOADER_IMPL_H_ | 6 #define MOJO_SERVICES_HTML_VIEWER_WEBURLLOADER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "mojo/common/handle_watcher.h" | 10 #include "mojo/common/handle_watcher.h" |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 virtual ~WebURLRequestExtraData(); | 25 virtual ~WebURLRequestExtraData(); |
| 26 | 26 |
| 27 mojo::URLResponsePtr synthetic_response; | 27 mojo::URLResponsePtr synthetic_response; |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 class WebURLLoaderImpl : public blink::WebURLLoader { | 30 class WebURLLoaderImpl : public blink::WebURLLoader { |
| 31 public: | 31 public: |
| 32 explicit WebURLLoaderImpl(mojo::NetworkService* network_service); | 32 explicit WebURLLoaderImpl(mojo::NetworkService* network_service); |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 virtual ~WebURLLoaderImpl(); | 35 virtual ~WebURLLoaderImpl(); |
|
sky
2015/03/27 21:24:26
If you're going fix overrides you should fix destr
| |
| 36 | 36 |
| 37 // blink::WebURLLoader methods: | 37 // blink::WebURLLoader methods: |
| 38 virtual void loadSynchronously( | 38 void loadSynchronously( |
| 39 const blink::WebURLRequest& request, blink::WebURLResponse& response, | 39 const blink::WebURLRequest& request, blink::WebURLResponse& response, |
| 40 blink::WebURLError& error, blink::WebData& data) override; | 40 blink::WebURLError& error, blink::WebData& data) override; |
| 41 virtual void loadAsynchronously( | 41 void loadAsynchronously( |
| 42 const blink::WebURLRequest&, blink::WebURLLoaderClient* client) override; | 42 const blink::WebURLRequest&, blink::WebURLLoaderClient* client) override; |
| 43 virtual void cancel() override; | 43 void cancel() override; |
| 44 virtual void setDefersLoading(bool defers_loading) override; | 44 void setDefersLoading(bool defers_loading) override; |
| 45 | 45 |
| 46 void OnReceivedResponse(mojo::URLResponsePtr response); | 46 void OnReceivedResponse(mojo::URLResponsePtr response); |
| 47 void OnReceivedError(mojo::URLResponsePtr response); | 47 void OnReceivedError(mojo::URLResponsePtr response); |
| 48 void OnReceivedRedirect(mojo::URLResponsePtr response); | 48 void OnReceivedRedirect(mojo::URLResponsePtr response); |
| 49 void ReadMore(); | 49 void ReadMore(); |
| 50 void WaitToReadMore(); | 50 void WaitToReadMore(); |
| 51 void OnResponseBodyStreamReady(MojoResult result); | 51 void OnResponseBodyStreamReady(MojoResult result); |
| 52 | 52 |
| 53 blink::WebURLLoaderClient* client_; | 53 blink::WebURLLoaderClient* client_; |
| 54 GURL url_; | 54 GURL url_; |
| 55 mojo::URLLoaderPtr url_loader_; | 55 mojo::URLLoaderPtr url_loader_; |
| 56 mojo::ScopedDataPipeConsumerHandle response_body_stream_; | 56 mojo::ScopedDataPipeConsumerHandle response_body_stream_; |
| 57 mojo::common::HandleWatcher handle_watcher_; | 57 mojo::common::HandleWatcher handle_watcher_; |
| 58 | 58 |
| 59 base::WeakPtrFactory<WebURLLoaderImpl> weak_factory_; | 59 base::WeakPtrFactory<WebURLLoaderImpl> weak_factory_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); | 61 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace html_viewer | 64 } // namespace html_viewer |
| 65 | 65 |
| 66 #endif // MOJO_SERVICES_HTML_VIEWER_WEBURLLOADER_IMPL_H_ | 66 #endif // MOJO_SERVICES_HTML_VIEWER_WEBURLLOADER_IMPL_H_ |
| OLD | NEW |