Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_base.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "content/browser/accessibility/browser_accessibility_manager.h" | 9 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 10 #include "content/browser/gpu/gpu_data_manager_impl.h" | 10 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 417 } | 417 } |
| 418 | 418 |
| 419 void RenderWidgetHostViewBase::ImeCancelComposition() { | 419 void RenderWidgetHostViewBase::ImeCancelComposition() { |
| 420 // TODO(ekaramad): Use TextInputManager code paths for IME on other platforms. | 420 // TODO(ekaramad): Use TextInputManager code paths for IME on other platforms. |
| 421 #if defined(USE_AURA) | 421 #if defined(USE_AURA) |
| 422 if (GetTextInputManager()) | 422 if (GetTextInputManager()) |
| 423 GetTextInputManager()->ImeCancelComposition(this); | 423 GetTextInputManager()->ImeCancelComposition(this); |
| 424 #endif | 424 #endif |
| 425 } | 425 } |
| 426 | 426 |
| 427 void RenderWidgetHostViewBase::ImeCompositionRangeChanged( | |
| 428 const gfx::Range& range, | |
| 429 const std::vector<gfx::Rect>& character_bounds) { | |
| 430 #if defined(USE_AURA) | |
|
kenrb
2016/07/08 18:13:42
I would add the TODO for removal on this guard, as
EhsanK
2016/07/11 18:07:21
Acknowledged.
| |
| 431 if (GetTextInputManager()) { | |
| 432 GetTextInputManager()->ImeCompositionRangeChanged(this, range, | |
| 433 character_bounds); | |
| 434 } | |
| 435 #endif | |
| 436 } | |
| 437 | |
| 427 TextInputManager* RenderWidgetHostViewBase::GetTextInputManager() { | 438 TextInputManager* RenderWidgetHostViewBase::GetTextInputManager() { |
| 428 if (text_input_manager_) | 439 if (text_input_manager_) |
| 429 return text_input_manager_; | 440 return text_input_manager_; |
| 430 | 441 |
| 431 RenderWidgetHostImpl* host = | 442 RenderWidgetHostImpl* host = |
| 432 RenderWidgetHostImpl::From(GetRenderWidgetHost()); | 443 RenderWidgetHostImpl::From(GetRenderWidgetHost()); |
| 433 if (!host || !host->delegate()) | 444 if (!host || !host->delegate()) |
| 434 return nullptr; | 445 return nullptr; |
| 435 | 446 |
| 436 // This RWHV needs to be registered with the TextInputManager so that the | 447 // This RWHV needs to be registered with the TextInputManager so that the |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 454 | 465 |
| 455 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { | 466 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { |
| 456 return false; | 467 return false; |
| 457 } | 468 } |
| 458 | 469 |
| 459 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { | 470 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { |
| 460 return cc::SurfaceId(); | 471 return cc::SurfaceId(); |
| 461 } | 472 } |
| 462 | 473 |
| 463 } // namespace content | 474 } // namespace content |
| OLD | NEW |