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

Unified Diff: sky/engine/core/script/dart_library_provider_webview.cc

Issue 1209033016: Remove dead code from DartController (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 | « sky/engine/core/script/dart_library_provider_webview.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/script/dart_library_provider_webview.cc
diff --git a/sky/engine/core/script/dart_library_provider_webview.cc b/sky/engine/core/script/dart_library_provider_webview.cc
deleted file mode 100644
index cea834138acec8a5b18d80860a2da53c6efc756d..0000000000000000000000000000000000000000
--- a/sky/engine/core/script/dart_library_provider_webview.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2015 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.
-
-#include "sky/engine/core/script/dart_library_provider_webview.h"
-
-#include "sky/engine/platform/fetcher/MojoFetcher.h"
-#include "sky/engine/platform/weborigin/KURL.h"
-#include "sky/engine/tonic/dart_converter.h"
-
-namespace blink {
-
-class DartLibraryProviderWebView::Job : public MojoFetcher::Client {
- public:
- Job(DartLibraryProviderWebView* provider,
- const String& name,
- DataPipeConsumerCallback callback)
- : provider_(provider), callback_(callback) {
- fetcher_ = adoptPtr(new MojoFetcher(this, KURL(ParsedURLString, name)));
- }
-
- ~Job() override {}
-
- private:
- void OnReceivedResponse(mojo::URLResponsePtr response) {
- if (response->status_code != 200) {
- callback_.Run(mojo::ScopedDataPipeConsumerHandle());
- } else {
- callback_.Run(response->body.Pass());
- }
- provider_->jobs_.remove(this);
- // We're deleted now.
- }
-
- DartLibraryProviderWebView* provider_;
- DataPipeConsumerCallback callback_;
- OwnPtr<MojoFetcher> fetcher_;
-};
-
-DartLibraryProviderWebView::DartLibraryProviderWebView() {
-}
-
-DartLibraryProviderWebView::~DartLibraryProviderWebView() {
-}
-
-void DartLibraryProviderWebView::GetLibraryAsStream(
- const String& name,
- DataPipeConsumerCallback callback) {
- jobs_.add(adoptPtr(new Job(this, name, callback)));
-}
-
-Dart_Handle DartLibraryProviderWebView::CanonicalizeURL(Dart_Handle library,
- Dart_Handle url) {
- String string = StringFromDart(url);
- if (string.startsWith("dart:"))
- return url;
- // TODO(abarth): The package root should be configurable.
- if (string.startsWith("package:"))
- string.replace("package:", "/packages/");
- String library_url_string = StringFromDart(Dart_LibraryUrl(library));
- KURL library_url = KURL(ParsedURLString, library_url_string);
- KURL resolved_url = KURL(library_url, string);
- return StringToDart(DartState::Current(), resolved_url.string());
-}
-
-} // namespace blink
« no previous file with comments | « sky/engine/core/script/dart_library_provider_webview.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698