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

Side by Side Diff: components/arc/ime/arc_ime_service.cc

Issue 2323823004: Add action for each button on opt-in IME menu. (Closed)
Patch Set: Created 4 years, 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/arc/ime/arc_ime_service.h" 5 #include "components/arc/ime/arc_ime_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 void ArcImeService::OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) { 172 void ArcImeService::OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) {
173 if (focused_arc_window_.windows().empty()) 173 if (focused_arc_window_.windows().empty())
174 return; 174 return;
175 aura::Window* window = focused_arc_window_.windows().front(); 175 aura::Window* window = focused_arc_window_.windows().front();
176 // Multiply by the scale factor. To convert from DPI to physical pixels. 176 // Multiply by the scale factor. To convert from DPI to physical pixels.
177 gfx::Rect bounds_in_px = gfx::ScaleToEnclosingRect( 177 gfx::Rect bounds_in_px = gfx::ScaleToEnclosingRect(
178 new_bounds, window->layer()->device_scale_factor()); 178 new_bounds, window->layer()->device_scale_factor());
179 ime_bridge_->SendOnKeyboardBoundsChanging(bounds_in_px); 179 ime_bridge_->SendOnKeyboardBoundsChanging(bounds_in_px);
180 } 180 }
181 181
182 void ArcImeService::OnKeyboardHidden() {}
183
182 //////////////////////////////////////////////////////////////////////////////// 184 ////////////////////////////////////////////////////////////////////////////////
183 // Overridden from ui::TextInputClient: 185 // Overridden from ui::TextInputClient:
184 186
185 void ArcImeService::SetCompositionText( 187 void ArcImeService::SetCompositionText(
186 const ui::CompositionText& composition) { 188 const ui::CompositionText& composition) {
187 has_composition_text_ = !composition.text.empty(); 189 has_composition_text_ = !composition.text.empty();
188 ime_bridge_->SendSetCompositionText(composition); 190 ime_bridge_->SendSetCompositionText(composition);
189 } 191 }
190 192
191 void ArcImeService::ConfirmCompositionText() { 193 void ArcImeService::ConfirmCompositionText() {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 base::i18n::TextDirection direction) { 327 base::i18n::TextDirection direction) {
326 return false; 328 return false;
327 } 329 }
328 330
329 bool ArcImeService::IsTextEditCommandEnabled( 331 bool ArcImeService::IsTextEditCommandEnabled(
330 ui::TextEditCommand command) const { 332 ui::TextEditCommand command) const {
331 return false; 333 return false;
332 } 334 }
333 335
334 } // namespace arc 336 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698