| 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 return; | 367 return; |
| 368 } | 368 } |
| 369 HRESULT hr = thread_manager_->SetFocus(document_manager); | 369 HRESULT hr = thread_manager_->SetFocus(document_manager); |
| 370 if (FAILED(hr)) { | 370 if (FAILED(hr)) { |
| 371 LOG(ERROR) << "ITfThreadMgr2::SetFocus failed. hr = " << hr; | 371 LOG(ERROR) << "ITfThreadMgr2::SetFocus failed. hr = " << hr; |
| 372 return; | 372 return; |
| 373 } | 373 } |
| 374 } | 374 } |
| 375 | 375 |
| 376 virtual void OnCompositionChanged( | 376 virtual void OnCompositionChanged( |
| 377 const string16& text, | 377 const base::string16& text, |
| 378 int32 selection_start, | 378 int32 selection_start, |
| 379 int32 selection_end, | 379 int32 selection_end, |
| 380 const std::vector<metro_viewer::UnderlineInfo>& underlines) OVERRIDE { | 380 const std::vector<metro_viewer::UnderlineInfo>& underlines) OVERRIDE { |
| 381 if (!delegate_) | 381 if (!delegate_) |
| 382 return; | 382 return; |
| 383 delegate_->OnCompositionChanged(text, | 383 delegate_->OnCompositionChanged(text, |
| 384 selection_start, | 384 selection_start, |
| 385 selection_end, | 385 selection_end, |
| 386 underlines); | 386 underlines); |
| 387 } | 387 } |
| 388 | 388 |
| 389 virtual void OnTextCommitted(const 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() { |
| 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 } |
| (...skipping 84 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 |