| 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 // TODO(ekaramad): Use TextInputManager code paths for IME on other platforms. | 481 // TODO(ekaramad): Use TextInputManager code paths for IME on other platforms. |
| 482 #if !defined(OS_ANDROID) | 482 #if !defined(OS_ANDROID) |
| 483 if (GetTextInputManager()) | 483 if (GetTextInputManager()) |
| 484 GetTextInputManager()->ImeCancelComposition(this); | 484 GetTextInputManager()->ImeCancelComposition(this); |
| 485 #endif | 485 #endif |
| 486 } | 486 } |
| 487 | 487 |
| 488 void RenderWidgetHostViewBase::ImeCompositionRangeChanged( | 488 void RenderWidgetHostViewBase::ImeCompositionRangeChanged( |
| 489 const gfx::Range& range, | 489 const gfx::Range& range, |
| 490 const std::vector<gfx::Rect>& character_bounds) { | 490 const std::vector<gfx::Rect>& character_bounds) { |
| 491 // TODO(ekaramad): Use TextInputManager code paths for IME on other platforms. | |
| 492 #if !defined(OS_ANDROID) | |
| 493 if (GetTextInputManager()) { | 491 if (GetTextInputManager()) { |
| 494 GetTextInputManager()->ImeCompositionRangeChanged(this, range, | 492 GetTextInputManager()->ImeCompositionRangeChanged(this, range, |
| 495 character_bounds); | 493 character_bounds); |
| 496 } | 494 } |
| 497 #endif | |
| 498 } | 495 } |
| 499 | 496 |
| 500 TextInputManager* RenderWidgetHostViewBase::GetTextInputManager() { | 497 TextInputManager* RenderWidgetHostViewBase::GetTextInputManager() { |
| 501 if (text_input_manager_) | 498 if (text_input_manager_) |
| 502 return text_input_manager_; | 499 return text_input_manager_; |
| 503 | 500 |
| 504 RenderWidgetHostImpl* host = | 501 RenderWidgetHostImpl* host = |
| 505 RenderWidgetHostImpl::From(GetRenderWidgetHost()); | 502 RenderWidgetHostImpl::From(GetRenderWidgetHost()); |
| 506 if (!host || !host->delegate()) | 503 if (!host || !host->delegate()) |
| 507 return nullptr; | 504 return nullptr; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 527 | 524 |
| 528 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { | 525 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { |
| 529 return false; | 526 return false; |
| 530 } | 527 } |
| 531 | 528 |
| 532 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { | 529 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { |
| 533 return cc::SurfaceId(); | 530 return cc::SurfaceId(); |
| 534 } | 531 } |
| 535 | 532 |
| 536 } // namespace content | 533 } // namespace content |
| OLD | NEW |