Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Unified Diff: mojo/examples/html_viewer/weburlloader_impl.h

Issue 393983004: Move mojo/examples/html_viewer to mojo/services/html_viewer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nuke 'examples' namespace Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/examples/html_viewer/webthread_impl.cc ('k') | mojo/examples/html_viewer/weburlloader_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/html_viewer/weburlloader_impl.h
diff --git a/mojo/examples/html_viewer/weburlloader_impl.h b/mojo/examples/html_viewer/weburlloader_impl.h
deleted file mode 100644
index 87d97e4a73f1aac2a9b6342343b62d59bf2ccee2..0000000000000000000000000000000000000000
--- a/mojo/examples/html_viewer/weburlloader_impl.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_EXAMPLE_HTML_VIEWER_WEBURLLOADER_IMPL_H_
-#define MOJO_EXAMPLE_HTML_VIEWER_WEBURLLOADER_IMPL_H_
-
-#include "base/memory/weak_ptr.h"
-#include "mojo/common/handle_watcher.h"
-#include "mojo/services/public/interfaces/network/url_loader.mojom.h"
-#include "third_party/WebKit/public/platform/WebURLLoader.h"
-#include "third_party/WebKit/public/platform/WebURLRequest.h"
-
-namespace mojo {
-class NetworkService;
-
-namespace examples {
-
-// The concrete type of WebURLRequest::ExtraData.
-class WebURLRequestExtraData : public blink::WebURLRequest::ExtraData {
- public:
- WebURLRequestExtraData();
- virtual ~WebURLRequestExtraData();
-
- URLResponsePtr synthetic_response;
-};
-
-class WebURLLoaderImpl : public blink::WebURLLoader {
- public:
- explicit WebURLLoaderImpl(NetworkService* network_service);
-
- private:
- virtual ~WebURLLoaderImpl();
-
- // blink::WebURLLoader methods:
- virtual void loadSynchronously(
- const blink::WebURLRequest& request, blink::WebURLResponse& response,
- blink::WebURLError& error, blink::WebData& data) OVERRIDE;
- virtual void loadAsynchronously(
- const blink::WebURLRequest&, blink::WebURLLoaderClient* client) OVERRIDE;
- virtual void cancel() OVERRIDE;
- virtual void setDefersLoading(bool defers_loading) OVERRIDE;
-
- void OnReceivedResponse(URLResponsePtr response);
- void OnReceivedError(URLResponsePtr response);
- void OnReceivedRedirect(URLResponsePtr response);
- void ReadMore();
- void WaitToReadMore();
- void OnResponseBodyStreamReady(MojoResult result);
-
- blink::WebURLLoaderClient* client_;
- GURL url_;
- URLLoaderPtr url_loader_;
- ScopedDataPipeConsumerHandle response_body_stream_;
- common::HandleWatcher handle_watcher_;
-
- base::WeakPtrFactory<WebURLLoaderImpl> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl);
-};
-
-} // namespace examples
-} // namespace mojo
-
-#endif // MOJO_EXAMPLE_HTML_VIEWER_WEBURLLOADER_IMPL_H_
« no previous file with comments | « mojo/examples/html_viewer/webthread_impl.cc ('k') | mojo/examples/html_viewer/weburlloader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698