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 "chrome/browser/ui/views/chrome_constrained_window_views_client.h" | 7 #include "chrome/browser/ui/views/chrome_constrained_window_views_client.h" |
8 #include "chrome/browser/ui/views/chrome_views_delegate.h" | 8 #include "chrome/browser/ui/views/chrome_views_delegate.h" |
9 #include "chrome/browser/ui/views/ime_driver/ime_driver_mus.h" | 9 #include "chrome/browser/ui/views/ime_driver/ime_driver_mus.h" |
10 #include "components/constrained_window/constrained_window_views.h" | 10 #include "components/constrained_window/constrained_window_views.h" |
11 | 11 |
12 #if defined(USE_AURA) | 12 #if defined(USE_AURA) |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
15 #include "content/public/common/service_manager_connection.h" | 15 #include "content/public/common/service_manager_connection.h" |
16 #include "services/service_manager/public/cpp/connector.h" | 16 #include "services/service_manager/public/cpp/connector.h" |
17 #include "services/service_manager/runner/common/client_util.h" | 17 #include "services/service_manager/runner/common/client_util.h" |
18 #include "services/ui/public/cpp/gpu/gpu.h" | 18 #include "services/ui/public/cpp/gpu/gpu.h" |
19 #include "services/ui/public/cpp/input_devices/input_device_client.h" | 19 #include "services/ui/public/cpp/input_devices/input_device_client.h" |
20 #include "services/ui/public/interfaces/constants.mojom.h" | 20 #include "services/ui/public/interfaces/constants.mojom.h" |
21 #include "services/ui/public/interfaces/input_devices/input_device_server.mojom.
h" | 21 #include "services/ui/public/interfaces/input_devices/input_device_server.mojom.
h" |
22 #include "ui/display/screen.h" | 22 #include "ui/display/screen.h" |
23 #include "ui/views/mus/mus_client.h" | 23 #include "ui/views/mus/window_manager_connection.h" |
24 #include "ui/views/widget/desktop_aura/desktop_screen.h" | 24 #include "ui/views/widget/desktop_aura/desktop_screen.h" |
25 #include "ui/wm/core/wm_state.h" | 25 #include "ui/wm/core/wm_state.h" |
26 #endif // defined(USE_AURA) | 26 #endif // defined(USE_AURA) |
27 | 27 |
28 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 28 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
29 #include "base/command_line.h" | 29 #include "base/command_line.h" |
30 #include "chrome/browser/ui/simple_message_box.h" | 30 #include "chrome/browser/ui/simple_message_box.h" |
31 #include "chrome/common/chrome_switches.h" | 31 #include "chrome/common/chrome_switches.h" |
32 #include "chrome/grit/chromium_strings.h" | 32 #include "chrome/grit/chromium_strings.h" |
33 #include "chrome/grit/generated_resources.h" | 33 #include "chrome/grit/generated_resources.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 base::RunLoop wait_loop; | 106 base::RunLoop wait_loop; |
107 connection->SetInitializeHandler(wait_loop.QuitClosure()); | 107 connection->SetInitializeHandler(wait_loop.QuitClosure()); |
108 wait_loop.Run(); | 108 wait_loop.Run(); |
109 | 109 |
110 input_device_client_.reset(new ui::InputDeviceClient()); | 110 input_device_client_.reset(new ui::InputDeviceClient()); |
111 ui::mojom::InputDeviceServerPtr server; | 111 ui::mojom::InputDeviceServerPtr server; |
112 connection->GetConnector()->ConnectToInterface(ui::mojom::kServiceName, | 112 connection->GetConnector()->ConnectToInterface(ui::mojom::kServiceName, |
113 &server); | 113 &server); |
114 input_device_client_->Connect(std::move(server)); | 114 input_device_client_->Connect(std::move(server)); |
115 | 115 |
116 // WMState is owned as a member, so don't have MusClient create it. | 116 window_manager_connection_ = views::WindowManagerConnection::Create( |
117 const bool create_wm_state = false; | |
118 mus_client_ = base::MakeUnique<views::MusClient>( | |
119 connection->GetConnector(), connection->GetIdentity(), | 117 connection->GetConnector(), connection->GetIdentity(), |
120 content::BrowserThread::GetTaskRunnerForThread( | 118 content::BrowserThread::GetTaskRunnerForThread( |
121 content::BrowserThread::IO), | 119 content::BrowserThread::IO)); |
122 create_wm_state); | |
123 } | 120 } |
124 #endif // defined(USE_AURA) | 121 #endif // defined(USE_AURA) |
125 } | 122 } |
OLD | NEW |