| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "win8/metro_driver/ime/text_service.h" | 5 #include "win8/metro_driver/ime/text_service.h" |
| 6 | 6 |
| 7 #include <msctf.h> | 7 #include <msctf.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/win/scoped_variant.h" | 10 #include "base/win/scoped_variant.h" |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 selection_end, | 385 selection_end, |
| 386 underlines); | 386 underlines); |
| 387 } | 387 } |
| 388 | 388 |
| 389 virtual void OnTextCommitted(const base::string16& text) override { | 389 virtual void OnTextCommitted(const base::string16& text) override { |
| 390 if (!delegate_) | 390 if (!delegate_) |
| 391 return; | 391 return; |
| 392 delegate_->OnTextCommitted(text); | 392 delegate_->OnTextCommitted(text); |
| 393 } | 393 } |
| 394 | 394 |
| 395 virtual RECT GetCaretBounds() { | 395 virtual RECT GetCaretBounds() override { |
| 396 if (composition_character_bounds_.empty()) { | 396 if (composition_character_bounds_.empty()) { |
| 397 const RECT rect = {}; | 397 const RECT rect = {}; |
| 398 return rect; | 398 return rect; |
| 399 } | 399 } |
| 400 const metro_viewer::CharacterBounds& bounds = | 400 const metro_viewer::CharacterBounds& bounds = |
| 401 composition_character_bounds_[0]; | 401 composition_character_bounds_[0]; |
| 402 POINT left_top = { bounds.left, bounds.top }; | 402 POINT left_top = { bounds.left, bounds.top }; |
| 403 POINT right_bottom = { bounds.right, bounds.bottom }; | 403 POINT right_bottom = { bounds.right, bounds.bottom }; |
| 404 ClientToScreen(window_handle_, &left_top); | 404 ClientToScreen(window_handle_, &left_top); |
| 405 ClientToScreen(window_handle_, &right_bottom); | 405 ClientToScreen(window_handle_, &right_bottom); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 thread_manager->Deactivate(); | 484 thread_manager->Deactivate(); |
| 485 return scoped_ptr<TextService>(); | 485 return scoped_ptr<TextService>(); |
| 486 } | 486 } |
| 487 return scoped_ptr<TextService>(new TextServiceImpl(thread_manager, | 487 return scoped_ptr<TextService>(new TextServiceImpl(thread_manager, |
| 488 client_id, | 488 client_id, |
| 489 window_handle, | 489 window_handle, |
| 490 delegate)); | 490 delegate)); |
| 491 } | 491 } |
| 492 | 492 |
| 493 } // namespace metro_driver | 493 } // namespace metro_driver |
| OLD | NEW |