| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/views/chrome_browser_main_extra_parts_views.h" | 5 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "chrome/browser/ui/views/chrome_constrained_window_views_client.h" | 8 #include "chrome/browser/ui/views/chrome_constrained_window_views_client.h" |
| 9 #include "chrome/browser/ui/views/chrome_views_delegate.h" | 9 #include "chrome/browser/ui/views/chrome_views_delegate.h" |
| 10 #include "chrome/browser/ui/views/ime_driver/ime_driver_mus.h" | 10 #include "chrome/browser/ui/views/ime_driver/ime_driver_mus.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 exit(EXIT_FAILURE); | 96 exit(EXIT_FAILURE); |
| 97 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) | 97 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 98 } | 98 } |
| 99 | 99 |
| 100 void ChromeBrowserMainExtraPartsViews::ServiceManagerConnectionStarted( | 100 void ChromeBrowserMainExtraPartsViews::ServiceManagerConnectionStarted( |
| 101 content::ServiceManagerConnection* connection) { | 101 content::ServiceManagerConnection* connection) { |
| 102 DCHECK(connection); | 102 DCHECK(connection); |
| 103 #if defined(USE_AURA) | 103 #if defined(USE_AURA) |
| 104 if (service_manager::ServiceManagerIsRemote()) { | 104 if (service_manager::ServiceManagerIsRemote()) { |
| 105 // TODO(rockot): Remove the blocking wait for init. | |
| 106 // http://crbug.com/594852. | |
| 107 base::RunLoop wait_loop; | |
| 108 connection->SetInitializeHandler(wait_loop.QuitClosure()); | |
| 109 wait_loop.Run(); | |
| 110 | |
| 111 input_device_client_.reset(new ui::InputDeviceClient()); | 105 input_device_client_.reset(new ui::InputDeviceClient()); |
| 112 ui::mojom::InputDeviceServerPtr server; | 106 ui::mojom::InputDeviceServerPtr server; |
| 113 connection->GetConnector()->BindInterface(ui::mojom::kServiceName, &server); | 107 connection->GetConnector()->BindInterface(ui::mojom::kServiceName, &server); |
| 114 input_device_client_->Connect(std::move(server)); | 108 input_device_client_->Connect(std::move(server)); |
| 115 | 109 |
| 116 // WMState is owned as a member, so don't have MusClient create it. | 110 // WMState is owned as a member, so don't have MusClient create it. |
| 117 const bool create_wm_state = false; | 111 const bool create_wm_state = false; |
| 118 mus_client_ = base::MakeUnique<views::MusClient>( | 112 mus_client_ = base::MakeUnique<views::MusClient>( |
| 119 connection->GetConnector(), connection->GetIdentity(), | 113 connection->GetConnector(), service_manager::Identity(), |
| 120 content::BrowserThread::GetTaskRunnerForThread( | 114 content::BrowserThread::GetTaskRunnerForThread( |
| 121 content::BrowserThread::IO), | 115 content::BrowserThread::IO), |
| 122 create_wm_state); | 116 create_wm_state); |
| 123 } | 117 } |
| 124 #endif // defined(USE_AURA) | 118 #endif // defined(USE_AURA) |
| 125 } | 119 } |
| OLD | NEW |