| 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 // TODO(ekaramad): Use TextInputManager code paths for IME on other platforms. |
| 431 #if defined(USE_AURA) |
| 432 if (GetTextInputManager()) { |
| 433 GetTextInputManager()->ImeCompositionRangeChanged(this, range, |
| 434 character_bounds); |
| 435 } |
| 436 #endif |
| 437 } |
| 438 |
| 427 TextInputManager* RenderWidgetHostViewBase::GetTextInputManager() { | 439 TextInputManager* RenderWidgetHostViewBase::GetTextInputManager() { |
| 428 if (text_input_manager_) | 440 if (text_input_manager_) |
| 429 return text_input_manager_; | 441 return text_input_manager_; |
| 430 | 442 |
| 431 RenderWidgetHostImpl* host = | 443 RenderWidgetHostImpl* host = |
| 432 RenderWidgetHostImpl::From(GetRenderWidgetHost()); | 444 RenderWidgetHostImpl::From(GetRenderWidgetHost()); |
| 433 if (!host || !host->delegate()) | 445 if (!host || !host->delegate()) |
| 434 return nullptr; | 446 return nullptr; |
| 435 | 447 |
| 436 // This RWHV needs to be registered with the TextInputManager so that the | 448 // This RWHV needs to be registered with the TextInputManager so that the |
| (...skipping 17 matching lines...) Expand all Loading... |
| 454 | 466 |
| 455 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { | 467 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { |
| 456 return false; | 468 return false; |
| 457 } | 469 } |
| 458 | 470 |
| 459 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { | 471 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { |
| 460 return cc::SurfaceId(); | 472 return cc::SurfaceId(); |
| 461 } | 473 } |
| 462 | 474 |
| 463 } // namespace content | 475 } // namespace content |
| OLD | NEW |