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

Unified Diff: mojo/apps/js/content_handler_impl.cc

Issue 646943006: Remove mojo/apps/js, it is unused (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/apps/js/content_handler_impl.h ('k') | mojo/apps/js/content_handler_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/apps/js/content_handler_impl.cc
diff --git a/mojo/apps/js/content_handler_impl.cc b/mojo/apps/js/content_handler_impl.cc
deleted file mode 100644
index 233e8af179d49f9acaecd56a75eae776fb7510b4..0000000000000000000000000000000000000000
--- a/mojo/apps/js/content_handler_impl.cc
+++ /dev/null
@@ -1,51 +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.
-
-#include "mojo/apps/js/content_handler_impl.h"
-
-#include "mojo/apps/js/application_delegate_impl.h"
-#include "mojo/apps/js/js_app.h"
-#include "mojo/common/data_pipe_utils.h"
-
-namespace mojo {
-namespace apps {
-
-class ContentHandlerJSApp : public JSApp {
- public:
- ContentHandlerJSApp(ApplicationDelegateImpl* app_delegate_impl,
- URLResponsePtr content)
- : JSApp(app_delegate_impl),
- content_(content.Pass()) {
- }
-
- bool Load(std::string* source, std::string* file_name) override {
- *file_name = content_->url;
- if (content_.is_null())
- return false;
- return common::BlockingCopyToString(content_->body.Pass(), source);
- }
-
- private:
- URLResponsePtr content_;
-};
-
-
-ContentHandlerImpl::ContentHandlerImpl(ApplicationDelegateImpl* app)
- : app_delegate_impl_(app) {
-}
-
-ContentHandlerImpl::~ContentHandlerImpl() {
-}
-
-void ContentHandlerImpl::OnConnect(
- const mojo::String& requestor_url,
- URLResponsePtr content,
- InterfaceRequest<ServiceProvider> service_provider) {
- scoped_ptr<JSApp> js_app(
- new ContentHandlerJSApp(app_delegate_impl_, content.Pass()));
- app_delegate_impl_->StartJSApp(js_app.Pass());
-}
-
-} // namespace apps
-} // namespace mojo
« no previous file with comments | « mojo/apps/js/content_handler_impl.h ('k') | mojo/apps/js/content_handler_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698