| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/chromeos/chrome_interface_factory.h" | 5 #include "chrome/browser/chromeos/chrome_interface_factory.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/profiles/profile_manager.h" | 8 #include "chrome/browser/profiles/profile_manager.h" |
| 9 #include "chrome/browser/ui/ash/app_list/app_list_presenter_service.h" | 9 #include "chrome/browser/ui/ash/app_list/app_list_presenter_service.h" |
| 10 #include "chrome/browser/ui/ash/chrome_wallpaper_manager.h" | 10 #include "chrome/browser/ui/ash/chrome_wallpaper_manager.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 mojo::BindingSet<mash::mojom::Launchable> bindings_; | 55 mojo::BindingSet<mash::mojom::Launchable> bindings_; |
| 56 | 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(ChromeLaunchable); | 57 DISALLOW_COPY_AND_ASSIGN(ChromeLaunchable); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 namespace chromeos { | 60 namespace chromeos { |
| 61 | 61 |
| 62 ChromeInterfaceFactory::ChromeInterfaceFactory() {} | 62 ChromeInterfaceFactory::ChromeInterfaceFactory() {} |
| 63 ChromeInterfaceFactory::~ChromeInterfaceFactory() {} | 63 ChromeInterfaceFactory::~ChromeInterfaceFactory() {} |
| 64 | 64 |
| 65 bool ChromeInterfaceFactory::AcceptConnection(shell::Connection* connection) { | 65 bool ChromeInterfaceFactory::OnConnect(shell::Connection* connection) { |
| 66 connection->AddInterface<keyboard::mojom::Keyboard>(this); | 66 connection->AddInterface<keyboard::mojom::Keyboard>(this); |
| 67 connection->AddInterface<mash::mojom::Launchable>(this); | 67 connection->AddInterface<mash::mojom::Launchable>(this); |
| 68 connection->AddInterface<ash::sysui::mojom::WallpaperManager>(this); | 68 connection->AddInterface<ash::sysui::mojom::WallpaperManager>(this); |
| 69 connection->AddInterface<app_list::mojom::AppListPresenter>(this); | 69 connection->AddInterface<app_list::mojom::AppListPresenter>(this); |
| 70 return true; | 70 return true; |
| 71 } | 71 } |
| 72 | 72 |
| 73 void ChromeInterfaceFactory::Create( | 73 void ChromeInterfaceFactory::Create( |
| 74 shell::Connection* connection, | 74 shell::Connection* connection, |
| 75 mojo::InterfaceRequest<keyboard::mojom::Keyboard> request) { | 75 mojo::InterfaceRequest<keyboard::mojom::Keyboard> request) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 96 void ChromeInterfaceFactory::Create( | 96 void ChromeInterfaceFactory::Create( |
| 97 shell::Connection* connection, | 97 shell::Connection* connection, |
| 98 mojo::InterfaceRequest<app_list::mojom::AppListPresenter> request) { | 98 mojo::InterfaceRequest<app_list::mojom::AppListPresenter> request) { |
| 99 if (!app_list_presenter_service_) | 99 if (!app_list_presenter_service_) |
| 100 app_list_presenter_service_.reset(new AppListPresenterService); | 100 app_list_presenter_service_.reset(new AppListPresenterService); |
| 101 app_list_presenter_bindings_.AddBinding(app_list_presenter_service_.get(), | 101 app_list_presenter_bindings_.AddBinding(app_list_presenter_service_.get(), |
| 102 std::move(request)); | 102 std::move(request)); |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace chromeos | 105 } // namespace chromeos |
| OLD | NEW |