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 "ui/aura/mus/window_tree_host_mus.h" | 5 #include "ui/aura/mus/window_tree_host_mus.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "ui/aura/env.h" | 8 #include "ui/aura/env.h" |
9 #include "ui/aura/mus/input_method_mus.h" | 9 #include "ui/aura/mus/input_method_mus.h" |
10 #include "ui/aura/mus/window_port_mus.h" | 10 #include "ui/aura/mus/window_port_mus.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 OnAcceleratedWidgetAvailable(accelerated_widget, | 77 OnAcceleratedWidgetAvailable(accelerated_widget, |
78 GetDisplay().device_scale_factor()); | 78 GetDisplay().device_scale_factor()); |
79 | 79 |
80 delegate_->OnWindowTreeHostCreated(this); | 80 delegate_->OnWindowTreeHostCreated(this); |
81 | 81 |
82 // Do not advertise accelerated widget; already set manually. | 82 // Do not advertise accelerated widget; already set manually. |
83 const bool use_default_accelerated_widget = false; | 83 const bool use_default_accelerated_widget = false; |
84 SetPlatformWindow(base::MakeUnique<ui::StubWindow>( | 84 SetPlatformWindow(base::MakeUnique<ui::StubWindow>( |
85 this, use_default_accelerated_widget, bounds_in_pixels)); | 85 this, use_default_accelerated_widget, bounds_in_pixels)); |
86 | 86 |
87 input_method_ = base::MakeUnique<InputMethodMus>(this, window()); | 87 if (!init_params.use_classic_ime) { |
88 input_method_->Init(init_params.window_tree_client->connector()); | 88 input_method_ = base::MakeUnique<InputMethodMus>(this, window()); |
89 SetSharedInputMethod(input_method_.get()); | 89 input_method_->Init(init_params.window_tree_client->connector()); |
| 90 SetSharedInputMethod(input_method_.get()); |
| 91 } |
90 | 92 |
91 compositor()->SetHostHasTransparentBackground(true); | 93 compositor()->SetHostHasTransparentBackground(true); |
92 | 94 |
93 // Mus windows are assumed hidden. | 95 // Mus windows are assumed hidden. |
94 compositor()->SetVisible(false); | 96 compositor()->SetVisible(false); |
95 | 97 |
96 if (init_params.frame_sink_id.is_valid()) | 98 if (init_params.frame_sink_id.is_valid()) |
97 window_mus->SetFrameSinkIdFromServer(init_params.frame_sink_id); | 99 window_mus->SetFrameSinkIdFromServer(init_params.frame_sink_id); |
98 } | 100 } |
99 | 101 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 void WindowTreeHostMus::MoveCursorToScreenLocationInPixels( | 214 void WindowTreeHostMus::MoveCursorToScreenLocationInPixels( |
213 const gfx::Point& location_in_pixels) { | 215 const gfx::Point& location_in_pixels) { |
214 // TODO: this needs to message the server http://crbug.com/693340. Setting | 216 // TODO: this needs to message the server http://crbug.com/693340. Setting |
215 // the location is really only appropriate in tests, outside of tests this | 217 // the location is really only appropriate in tests, outside of tests this |
216 // value is ignored. | 218 // value is ignored. |
217 NOTIMPLEMENTED(); | 219 NOTIMPLEMENTED(); |
218 Env::GetInstance()->set_last_mouse_location(location_in_pixels); | 220 Env::GetInstance()->set_last_mouse_location(location_in_pixels); |
219 } | 221 } |
220 | 222 |
221 } // namespace aura | 223 } // namespace aura |
OLD | NEW |