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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 | 396 |
397 void RenderWidgetHostViewBase::TransformPointToLocalCoordSpace( | 397 void RenderWidgetHostViewBase::TransformPointToLocalCoordSpace( |
398 const gfx::Point& point, | 398 const gfx::Point& point, |
399 cc::SurfaceId original_surface, | 399 cc::SurfaceId original_surface, |
400 gfx::Point* transformed_point) { | 400 gfx::Point* transformed_point) { |
401 *transformed_point = point; | 401 *transformed_point = point; |
402 } | 402 } |
403 | 403 |
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 for IME on other platforms. |
407 // other platforms. | |
408 #if defined(USE_AURA) | 407 #if defined(USE_AURA) |
409 if (GetTextInputManager()) | 408 if (GetTextInputManager()) |
410 GetTextInputManager()->UpdateTextInputState(this, text_input_state); | 409 GetTextInputManager()->UpdateTextInputState(this, text_input_state); |
411 #endif | 410 #endif |
412 } | 411 } |
413 | 412 |
| 413 void RenderWidgetHostViewBase::ImeCancelComposition() { |
| 414 // TODO(ekaramad): Use TextInputManager code paths for IME on other platforms. |
| 415 #if defined(USE_AURA) |
| 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 |