| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/profiler.h" | 8 #include "base/debug/profiler.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 http_server_factory->CreateHttpServer(GetProxy(&http_server_).Pass(), | 59 http_server_factory->CreateHttpServer(GetProxy(&http_server_).Pass(), |
| 60 local_address.Pass()); | 60 local_address.Pass()); |
| 61 | 61 |
| 62 http_server::HttpHandlerPtr handler_ptr; | 62 http_server::HttpHandlerPtr handler_ptr; |
| 63 handler_binding_.Bind(GetProxy(&handler_ptr).Pass()); | 63 handler_binding_.Bind(GetProxy(&handler_ptr).Pass()); |
| 64 http_server_->SetHandler(".*", handler_ptr.Pass(), | 64 http_server_->SetHandler(".*", handler_ptr.Pass(), |
| 65 [](bool result) { DCHECK(result); }); | 65 [](bool result) { DCHECK(result); }); |
| 66 } | 66 } |
| 67 | 67 |
| 68 bool ConfigureIncomingConnection( | 68 bool ConfigureIncomingConnection( |
| 69 mojo::ApplicationConnection* connection) override { | 69 mojo::ApplicationConnection* connection, |
| 70 const std::string& url) override { |
| 70 return true; | 71 return true; |
| 71 } | 72 } |
| 72 | 73 |
| 73 // http_server::HttpHandler: | 74 // http_server::HttpHandler: |
| 74 void HandleRequest(http_server::HttpRequestPtr request, | 75 void HandleRequest(http_server::HttpRequestPtr request, |
| 75 const HandleRequestCallback& callback) override { | 76 const HandleRequestCallback& callback) override { |
| 76 // FIXME: We should use use a fancier lookup system more like what | 77 // FIXME: We should use use a fancier lookup system more like what |
| 77 // services/http_server/http_server.cc does with AddHandler. | 78 // services/http_server/http_server.cc does with AddHandler. |
| 78 if (request->relative_url == "/reload") { | 79 if (request->relative_url == "/reload") { |
| 79 Load(callback, url_); | 80 Load(callback, url_); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 }; | 200 }; |
| 200 | 201 |
| 201 } // namespace debugger | 202 } // namespace debugger |
| 202 } // namespace sky | 203 } // namespace sky |
| 203 | 204 |
| 204 MojoResult MojoMain(MojoHandle shell_handle) { | 205 MojoResult MojoMain(MojoHandle shell_handle) { |
| 205 mojo::ApplicationRunnerChromium runner(new sky::debugger::SkyDebugger); | 206 mojo::ApplicationRunnerChromium runner(new sky::debugger::SkyDebugger); |
| 206 runner.set_message_loop_type(base::MessageLoop::TYPE_IO); | 207 runner.set_message_loop_type(base::MessageLoop::TYPE_IO); |
| 207 return runner.Run(shell_handle); | 208 return runner.Run(shell_handle); |
| 208 } | 209 } |
| OLD | NEW |