Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "mojo/ui/content_viewer_app.h" | 5 #include "mojo/ui/content_viewer_app.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 | 9 |
| 10 namespace mojo { | 10 namespace mojo { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 57 content_handler_request.Pass()); | 57 content_handler_request.Pass()); |
| 58 }); | 58 }); |
| 59 return true; | 59 return true; |
| 60 } | 60 } |
| 61 | 61 |
| 62 void ContentViewerApp::StartViewer( | 62 void ContentViewerApp::StartViewer( |
| 63 const std::string& content_handler_url, | 63 const std::string& content_handler_url, |
| 64 mojo::InterfaceRequest<mojo::Application> application_request, | 64 mojo::InterfaceRequest<mojo::Application> application_request, |
| 65 mojo::URLResponsePtr response) { | 65 mojo::URLResponsePtr response) { |
| 66 ViewProviderApp* app = LoadContent(content_handler_url, response.Pass()); | 66 ViewProviderApp* app = LoadContent(content_handler_url, response.Pass()); |
| 67 if (app) | 67 if (app) { |
| 68 // TODO(vtl): This is leaky, since |ApplicationImpl| doesn't own itself. | |
|
vardhan
2016/05/19 02:39:36
cc jeffbrown?
| |
| 69 // (Also, who owns |*app|?) | |
| 68 new mojo::ApplicationImpl(app, application_request.Pass()); | 70 new mojo::ApplicationImpl(app, application_request.Pass()); |
| 71 } | |
| 69 } | 72 } |
| 70 | 73 |
| 71 } // namespace ui | 74 } // namespace ui |
| 72 } // namespace mojo | 75 } // namespace mojo |
| OLD | NEW |