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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 if (url.is_valid()) { | 47 if (url.is_valid()) { |
48 default_url_ = url.spec(); | 48 default_url_ = url.spec(); |
49 break; | 49 break; |
50 } | 50 } |
51 } | 51 } |
52 mus::CreateWindowTreeHost(shell_, this, &host_, nullptr, nullptr); | 52 mus::CreateWindowTreeHost(shell_, this, &host_, nullptr, nullptr); |
53 } | 53 } |
54 | 54 |
55 bool PhoneBrowserApplicationDelegate::AcceptConnection( | 55 bool PhoneBrowserApplicationDelegate::AcceptConnection( |
56 mojo::Connection* connection) { | 56 mojo::Connection* connection) { |
57 connection->AddService<LaunchHandler>(this); | 57 connection->AddInterface<LaunchHandler>(this); |
58 return true; | 58 return true; |
59 } | 59 } |
60 | 60 |
61 //////////////////////////////////////////////////////////////////////////////// | 61 //////////////////////////////////////////////////////////////////////////////// |
62 // PhoneBrowserApplicationDelegate, LaunchHandler implementation: | 62 // PhoneBrowserApplicationDelegate, LaunchHandler implementation: |
63 | 63 |
64 void PhoneBrowserApplicationDelegate::LaunchURL(const mojo::String& url) { | 64 void PhoneBrowserApplicationDelegate::LaunchURL(const mojo::String& url) { |
65 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 65 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
66 request->url = url; | 66 request->url = url; |
67 web_view_.web_view()->LoadRequest(request.Pass()); | 67 web_view_.web_view()->LoadRequest(request.Pass()); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // PhoneBrowserApplicationDelegate, | 126 // PhoneBrowserApplicationDelegate, |
127 // mojo::InterfaceFactory<LaunchHandler> implementation: | 127 // mojo::InterfaceFactory<LaunchHandler> implementation: |
128 | 128 |
129 void PhoneBrowserApplicationDelegate::Create( | 129 void PhoneBrowserApplicationDelegate::Create( |
130 mojo::Connection* connection, | 130 mojo::Connection* connection, |
131 mojo::InterfaceRequest<LaunchHandler> request) { | 131 mojo::InterfaceRequest<LaunchHandler> request) { |
132 launch_handler_bindings_.AddBinding(this, request.Pass()); | 132 launch_handler_bindings_.AddBinding(this, request.Pass()); |
133 } | 133 } |
134 | 134 |
135 } // namespace mandoline | 135 } // namespace mandoline |
OLD | NEW |