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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 404 void RenderWidgetHostViewBase::TextInputStateChanged( | 404 void RenderWidgetHostViewBase::TextInputStateChanged( |
| 405 const TextInputState& text_input_state) { | 405 const TextInputState& text_input_state) { |
| 406 // TODO(ekaramad): Use TextInputManager code paths when IME is implemented on | 406 // TODO(ekaramad): Use TextInputManager code paths when IME is implemented on |
| 407 // other platforms. | 407 // other platforms. |
| 408 #if defined(USE_AURA) | 408 #if defined(USE_AURA) |
| 409 if (GetTextInputManager()) | 409 if (GetTextInputManager()) |
| 410 GetTextInputManager()->UpdateTextInputState(this, text_input_state); | 410 GetTextInputManager()->UpdateTextInputState(this, text_input_state); |
| 411 #endif | 411 #endif |
| 412 } | 412 } |
| 413 | 413 |
| 414 void RenderWidgetHostViewBase::ImeCancelComposition() { | |
| 415 #if defined(USE_AURA) | |
|
Charlie Reis
2016/06/28 21:33:46
Same TODO as above?
EhsanK
2016/06/28 22:05:01
Acknowledged.
| |
| 416 if (GetTextInputManager()) | |
| 417 GetTextInputManager()->ImeCancelComposition(this); | |
| 418 #endif | |
| 419 } | |
| 420 | |
| 414 TextInputManager* RenderWidgetHostViewBase::GetTextInputManager() { | 421 TextInputManager* RenderWidgetHostViewBase::GetTextInputManager() { |
| 415 if (text_input_manager_) | 422 if (text_input_manager_) |
| 416 return text_input_manager_; | 423 return text_input_manager_; |
| 417 | 424 |
| 418 RenderWidgetHostImpl* host = | 425 RenderWidgetHostImpl* host = |
| 419 RenderWidgetHostImpl::From(GetRenderWidgetHost()); | 426 RenderWidgetHostImpl::From(GetRenderWidgetHost()); |
| 420 if (!host || !host->delegate()) | 427 if (!host || !host->delegate()) |
| 421 return nullptr; | 428 return nullptr; |
| 422 | 429 |
| 423 // This RWHV needs to be registered with the TextInputManager so that the | 430 // This RWHV needs to be registered with the TextInputManager so that the |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 441 | 448 |
| 442 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { | 449 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { |
| 443 return false; | 450 return false; |
| 444 } | 451 } |
| 445 | 452 |
| 446 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { | 453 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { |
| 447 return cc::SurfaceId(); | 454 return cc::SurfaceId(); |
| 448 } | 455 } |
| 449 | 456 |
| 450 } // namespace content | 457 } // namespace content |
| OLD | NEW |