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

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

Issue 608333002: Standalone Mojo Javascript application (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the GN build Created 6 years, 3 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
Index: mojo/apps/js/application_delegate_impl.cc
diff --git a/mojo/apps/js/application_delegate_impl.cc b/mojo/apps/js/application_delegate_impl.cc
index 81cff286b047a416e9fb8c3ec862a0ba723d33aa..65c48ca8ac615abf19f179b1e610281cd246cf7d 100644
--- a/mojo/apps/js/application_delegate_impl.cc
+++ b/mojo/apps/js/application_delegate_impl.cc
@@ -10,22 +10,8 @@
namespace mojo {
namespace apps {
-ContentHandlerImpl::ContentHandlerImpl(ApplicationDelegateImpl* app)
- : content_handler_(app) {
-}
-
-ContentHandlerImpl::~ContentHandlerImpl() {
-}
-
-void ContentHandlerImpl::OnConnect(
- const mojo::String& url,
- URLResponsePtr content,
- InterfaceRequest<ServiceProvider> service_provider) {
- content_handler_->StartJSApp(url.To<std::string>(), content.Pass());
-}
-
ApplicationDelegateImpl::ApplicationDelegateImpl()
- : application_impl_(NULL), content_handler_factory_(this) {
+ : application_impl_(nullptr) {
}
void ApplicationDelegateImpl::Initialize(ApplicationImpl* app) {
@@ -35,15 +21,8 @@ void ApplicationDelegateImpl::Initialize(ApplicationImpl* app) {
ApplicationDelegateImpl::~ApplicationDelegateImpl() {
}
-bool ApplicationDelegateImpl::ConfigureIncomingConnection(
- ApplicationConnection* connection) {
- connection->AddService(&content_handler_factory_);
- return true;
-}
-
-void ApplicationDelegateImpl::StartJSApp(const std::string& url,
- URLResponsePtr content) {
- JSApp* app = new JSApp(this, url, content.Pass());
+void ApplicationDelegateImpl::StartJSApp(scoped_ptr<JSApp> app_ptr) {
+ JSApp *app = app_ptr.release();
app_vector_.push_back(app);
// TODO(hansmuller): deal with the Start() return value.
app->Start();

Powered by Google App Engine
This is Rietveld 408576698