| 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 "mandoline/ui/phone_ui/phone_browser_application_delegate.h" | 5 #include "mandoline/ui/phone_ui/phone_browser_application_delegate.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "components/mus/public/cpp/window.h" | 8 #include "components/mus/public/cpp/window.h" |
| 9 #include "components/mus/public/cpp/window_tree_connection.h" | 9 #include "components/mus/public/cpp/window_tree_connection.h" |
| 10 #include "components/mus/public/cpp/window_tree_host_factory.h" | 10 #include "components/mus/public/cpp/window_tree_host_factory.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 app_ = app; | 40 app_ = app; |
| 41 | 41 |
| 42 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 42 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 43 for (const auto& arg : command_line->GetArgs()) { | 43 for (const auto& arg : command_line->GetArgs()) { |
| 44 GURL url(arg); | 44 GURL url(arg); |
| 45 if (url.is_valid()) { | 45 if (url.is_valid()) { |
| 46 default_url_ = url.spec(); | 46 default_url_ = url.spec(); |
| 47 break; | 47 break; |
| 48 } | 48 } |
| 49 } | 49 } |
| 50 mus::CreateSingleWindowTreeHost(app_, this, &host_); | 50 mus::CreateSingleWindowTreeHost(app_, this, &host_, nullptr); |
| 51 } | 51 } |
| 52 | 52 |
| 53 bool PhoneBrowserApplicationDelegate::ConfigureIncomingConnection( | 53 bool PhoneBrowserApplicationDelegate::ConfigureIncomingConnection( |
| 54 mojo::ApplicationConnection* connection) { | 54 mojo::ApplicationConnection* connection) { |
| 55 connection->AddService<LaunchHandler>(this); | 55 connection->AddService<LaunchHandler>(this); |
| 56 return true; | 56 return true; |
| 57 } | 57 } |
| 58 | 58 |
| 59 //////////////////////////////////////////////////////////////////////////////// | 59 //////////////////////////////////////////////////////////////////////////////// |
| 60 // PhoneBrowserApplicationDelegate, LaunchHandler implementation: | 60 // PhoneBrowserApplicationDelegate, LaunchHandler implementation: |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // PhoneBrowserApplicationDelegate, | 125 // PhoneBrowserApplicationDelegate, |
| 126 // mojo::InterfaceFactory<LaunchHandler> implementation: | 126 // mojo::InterfaceFactory<LaunchHandler> implementation: |
| 127 | 127 |
| 128 void PhoneBrowserApplicationDelegate::Create( | 128 void PhoneBrowserApplicationDelegate::Create( |
| 129 mojo::ApplicationConnection* connection, | 129 mojo::ApplicationConnection* connection, |
| 130 mojo::InterfaceRequest<LaunchHandler> request) { | 130 mojo::InterfaceRequest<LaunchHandler> request) { |
| 131 launch_handler_bindings_.AddBinding(this, request.Pass()); | 131 launch_handler_bindings_.AddBinding(this, request.Pass()); |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace mandoline | 134 } // namespace mandoline |
| OLD | NEW |