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/desktop_ui/browser_manager.h" | 5 #include "mandoline/ui/desktop_ui/browser_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "components/mus/public/cpp/window.h" | 10 #include "components/mus/public/cpp/window.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 if (url.is_valid()) | 64 if (url.is_valid()) |
65 CreateBrowser(url); | 65 CreateBrowser(url); |
66 } | 66 } |
67 // If there were no valid URLs in the command line create a Browser with the | 67 // If there were no valid URLs in the command line create a Browser with the |
68 // default URL. | 68 // default URL. |
69 if (browsers_.empty()) | 69 if (browsers_.empty()) |
70 CreateBrowser(GURL(kGoogleURL)); | 70 CreateBrowser(GURL(kGoogleURL)); |
71 } | 71 } |
72 | 72 |
73 bool BrowserManager::AcceptConnection(mojo::Connection* connection) { | 73 bool BrowserManager::AcceptConnection(mojo::Connection* connection) { |
74 connection->AddService<LaunchHandler>(this); | 74 connection->AddInterface<LaunchHandler>(this); |
75 return true; | 75 return true; |
76 } | 76 } |
77 | 77 |
78 void BrowserManager::Create(mojo::Connection* connection, | 78 void BrowserManager::Create(mojo::Connection* connection, |
79 mojo::InterfaceRequest<LaunchHandler> request) { | 79 mojo::InterfaceRequest<LaunchHandler> request) { |
80 launch_handler_bindings_.AddBinding(this, std::move(request)); | 80 launch_handler_bindings_.AddBinding(this, std::move(request)); |
81 } | 81 } |
82 | 82 |
83 } // namespace mandoline | 83 } // namespace mandoline |
OLD | NEW |