Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1138)

Side by Side Diff: ui/views/mus/input_method_mus.cc

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/mus/input_method_mus.h ('k') | ui/views/mus/input_method_mus_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/views/mus/input_method_mus.h" 5 #include "ui/views/mus/input_method_mus.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "services/ui/public/cpp/window.h" 9 #include "services/ui/public/cpp/window.h"
10 #include "services/ui/public/interfaces/ime.mojom.h" 10 #include "services/ui/public/interfaces/ime.mojom.h"
11 #include "ui/base/ime/text_input_client.h" 11 #include "ui/base/ime/text_input_client.h"
12 #include "ui/events/event.h" 12 #include "ui/events/event.h"
13 #include "ui/platform_window/mojo/ime_type_converters.h" 13 #include "ui/platform_window/mojo/ime_type_converters.h"
14 #include "ui/platform_window/mojo/text_input_state.mojom.h" 14 #include "ui/platform_window/mojo/text_input_state.mojom.h"
15 #include "ui/views/mus/text_input_client_impl.h" 15 #include "ui/views/mus/text_input_client_impl.h"
16 16
17 namespace views { 17 namespace views {
18 18
19 //////////////////////////////////////////////////////////////////////////////// 19 ////////////////////////////////////////////////////////////////////////////////
20 // InputMethodMus, public: 20 // InputMethodMus, public:
21 21
22 InputMethodMus::InputMethodMus(ui::internal::InputMethodDelegate* delegate, 22 InputMethodMus::InputMethodMus(ui::internal::InputMethodDelegate* delegate,
23 ui::Window* window) 23 ui::Window* window)
24 : window_(window) { 24 : window_(window) {
25 SetDelegate(delegate); 25 SetDelegate(delegate);
26 } 26 }
27 27
28 InputMethodMus::~InputMethodMus() {} 28 InputMethodMus::~InputMethodMus() {}
29 29
30 void InputMethodMus::Init(shell::Connector* connector) { 30 void InputMethodMus::Init(service_manager::Connector* connector) {
31 connector->ConnectToInterface("service:ui", &ime_server_); 31 connector->ConnectToInterface("service:ui", &ime_server_);
32 } 32 }
33 33
34 //////////////////////////////////////////////////////////////////////////////// 34 ////////////////////////////////////////////////////////////////////////////////
35 // InputMethodMus, ui::InputMethod implementation: 35 // InputMethodMus, ui::InputMethod implementation:
36 36
37 void InputMethodMus::OnFocus() { 37 void InputMethodMus::OnFocus() {
38 InputMethodBase::OnFocus(); 38 InputMethodBase::OnFocus();
39 UpdateTextInputType(); 39 UpdateTextInputType();
40 } 40 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 state->type = mojo::ConvertTo<mojo::TextInputType>(type); 125 state->type = mojo::ConvertTo<mojo::TextInputType>(type);
126 if (window_) { 126 if (window_) {
127 if (type != ui::TEXT_INPUT_TYPE_NONE) 127 if (type != ui::TEXT_INPUT_TYPE_NONE)
128 window_->SetImeVisibility(true, std::move(state)); 128 window_->SetImeVisibility(true, std::move(state));
129 else 129 else
130 window_->SetTextInputState(std::move(state)); 130 window_->SetTextInputState(std::move(state));
131 } 131 }
132 } 132 }
133 133
134 } // namespace views 134 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/input_method_mus.h ('k') | ui/views/mus/input_method_mus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698