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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 5003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5014 UpdateSelectionBounds(); | 5014 UpdateSelectionBounds(); |
5015 } | 5015 } |
5016 | 5016 |
5017 bool RenderViewImpl::GetPpapiPluginCaretBounds(gfx::Rect* rect) { | 5017 bool RenderViewImpl::GetPpapiPluginCaretBounds(gfx::Rect* rect) { |
5018 if (!pepper_delegate_.IsPluginFocused()) | 5018 if (!pepper_delegate_.IsPluginFocused()) |
5019 return false; | 5019 return false; |
5020 *rect = pepper_delegate_.GetCaretBounds(); | 5020 *rect = pepper_delegate_.GetCaretBounds(); |
5021 return true; | 5021 return true; |
5022 } | 5022 } |
5023 | 5023 |
| 5024 void RenderViewImpl::SimulateImeSetComposition( |
| 5025 const string16& text, |
| 5026 const std::vector<WebKit::WebCompositionUnderline>& underlines, |
| 5027 int selection_start, |
| 5028 int selection_end) { |
| 5029 OnImeSetComposition(text, underlines, selection_start, selection_end); |
| 5030 } |
| 5031 |
| 5032 void RenderViewImpl::SimulateImeConfirmComposition( |
| 5033 const string16& text, |
| 5034 const ui::Range& replacement_range) { |
| 5035 OnImeConfirmComposition(text, replacement_range); |
| 5036 } |
| 5037 |
5024 void RenderViewImpl::PpapiPluginCancelComposition() { | 5038 void RenderViewImpl::PpapiPluginCancelComposition() { |
5025 Send(new ViewHostMsg_ImeCancelComposition(routing_id())); | 5039 Send(new ViewHostMsg_ImeCancelComposition(routing_id())); |
5026 ui::Range range(ui::Range::InvalidRange()); | 5040 ui::Range range(ui::Range::InvalidRange()); |
5027 Send(new ViewHostMsg_ImeCompositionRangeChanged(routing_id(), range)); | 5041 Send(new ViewHostMsg_ImeCompositionRangeChanged(routing_id(), range)); |
5028 } | 5042 } |
5029 | 5043 |
5030 void RenderViewImpl::PpapiPluginSelectionChanged() { | 5044 void RenderViewImpl::PpapiPluginSelectionChanged() { |
5031 SyncSelectionIfRequired(); | 5045 SyncSelectionIfRequired(); |
5032 } | 5046 } |
5033 | 5047 |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5411 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5425 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5412 return !!RenderThreadImpl::current()->compositor_thread(); | 5426 return !!RenderThreadImpl::current()->compositor_thread(); |
5413 } | 5427 } |
5414 | 5428 |
5415 void RenderViewImpl::OnJavaBridgeInit() { | 5429 void RenderViewImpl::OnJavaBridgeInit() { |
5416 DCHECK(!java_bridge_dispatcher_); | 5430 DCHECK(!java_bridge_dispatcher_); |
5417 #if defined(ENABLE_JAVA_BRIDGE) | 5431 #if defined(ENABLE_JAVA_BRIDGE) |
5418 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5432 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5419 #endif | 5433 #endif |
5420 } | 5434 } |
OLD | NEW |