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

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

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 3 years, 12 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/aura/mus/window_tree_client.cc ('k') | url/mojo/url_gurl_struct_traits_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/constants.mojom.h" 10 #include "services/ui/public/interfaces/constants.mojom.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 117
118 void InputMethodMus::OnDidChangeFocusedClient( 118 void InputMethodMus::OnDidChangeFocusedClient(
119 ui::TextInputClient* focused_before, 119 ui::TextInputClient* focused_before,
120 ui::TextInputClient* focused) { 120 ui::TextInputClient* focused) {
121 InputMethodBase::OnDidChangeFocusedClient(focused_before, focused); 121 InputMethodBase::OnDidChangeFocusedClient(focused_before, focused);
122 UpdateTextInputType(); 122 UpdateTextInputType();
123 123
124 text_input_client_ = base::MakeUnique<TextInputClientImpl>(focused); 124 text_input_client_ = base::MakeUnique<TextInputClientImpl>(focused);
125 ime_server_->StartSession(text_input_client_->CreateInterfacePtrAndBind(), 125 ime_server_->StartSession(text_input_client_->CreateInterfacePtrAndBind(),
126 GetProxy(&input_method_)); 126 MakeRequest(&input_method_));
127 } 127 }
128 128
129 void InputMethodMus::UpdateTextInputType() { 129 void InputMethodMus::UpdateTextInputType() {
130 ui::TextInputType type = GetTextInputType(); 130 ui::TextInputType type = GetTextInputType();
131 mojo::TextInputStatePtr state = mojo::TextInputState::New(); 131 mojo::TextInputStatePtr state = mojo::TextInputState::New();
132 state->type = mojo::ConvertTo<mojo::TextInputType>(type); 132 state->type = mojo::ConvertTo<mojo::TextInputType>(type);
133 if (window_) { 133 if (window_) {
134 if (type != ui::TEXT_INPUT_TYPE_NONE) 134 if (type != ui::TEXT_INPUT_TYPE_NONE)
135 window_->SetImeVisibility(true, std::move(state)); 135 window_->SetImeVisibility(true, std::move(state));
136 else 136 else
(...skipping 18 matching lines...) Expand all
155 event_result = EventResult::HANDLED; 155 event_result = EventResult::HANDLED;
156 } 156 }
157 // |ack_callback| can be null if the standard form of DispatchKeyEvent() is 157 // |ack_callback| can be null if the standard form of DispatchKeyEvent() is
158 // called instead of the version which provides a callback. In mus+ash we 158 // called instead of the version which provides a callback. In mus+ash we
159 // use the version with callback, but some unittests use the standard form. 159 // use the version with callback, but some unittests use the standard form.
160 if (ack_callback) 160 if (ack_callback)
161 ack_callback->Run(event_result); 161 ack_callback->Run(event_result);
162 } 162 }
163 163
164 } // namespace views 164 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client.cc ('k') | url/mojo/url_gurl_struct_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698