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 5289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5300 Send(new ViewHostMsg_ImeCancelComposition(routing_id())); | 5300 Send(new ViewHostMsg_ImeCancelComposition(routing_id())); |
5301 const ui::Range range(ui::Range::InvalidRange()); | 5301 const ui::Range range(ui::Range::InvalidRange()); |
5302 const std::vector<gfx::Rect> empty_bounds; | 5302 const std::vector<gfx::Rect> empty_bounds; |
5303 UpdateCompositionInfo(range, empty_bounds); | 5303 UpdateCompositionInfo(range, empty_bounds); |
5304 } | 5304 } |
5305 | 5305 |
5306 void RenderViewImpl::PpapiPluginSelectionChanged() { | 5306 void RenderViewImpl::PpapiPluginSelectionChanged() { |
5307 SyncSelectionIfRequired(); | 5307 SyncSelectionIfRequired(); |
5308 } | 5308 } |
5309 | 5309 |
| 5310 void RenderViewImpl::PpapiPluginCreated(ppapi::host::PpapiHost* host) { |
| 5311 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
| 5312 DidCreatePepperPlugin(host)); |
| 5313 } |
| 5314 |
5310 void RenderViewImpl::OnImeSetComposition( | 5315 void RenderViewImpl::OnImeSetComposition( |
5311 const string16& text, | 5316 const string16& text, |
5312 const std::vector<WebKit::WebCompositionUnderline>& underlines, | 5317 const std::vector<WebKit::WebCompositionUnderline>& underlines, |
5313 int selection_start, | 5318 int selection_start, |
5314 int selection_end) { | 5319 int selection_end) { |
5315 if (pepper_delegate_.IsPluginFocused()) { | 5320 if (pepper_delegate_.IsPluginFocused()) { |
5316 // When a PPAPI plugin has focus, we bypass WebKit. | 5321 // When a PPAPI plugin has focus, we bypass WebKit. |
5317 pepper_delegate_.OnImeSetComposition(text, | 5322 pepper_delegate_.OnImeSetComposition(text, |
5318 underlines, | 5323 underlines, |
5319 selection_start, | 5324 selection_start, |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5715 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5720 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5716 return !!RenderThreadImpl::current()->compositor_thread(); | 5721 return !!RenderThreadImpl::current()->compositor_thread(); |
5717 } | 5722 } |
5718 | 5723 |
5719 void RenderViewImpl::OnJavaBridgeInit() { | 5724 void RenderViewImpl::OnJavaBridgeInit() { |
5720 DCHECK(!java_bridge_dispatcher_); | 5725 DCHECK(!java_bridge_dispatcher_); |
5721 #if defined(ENABLE_JAVA_BRIDGE) | 5726 #if defined(ENABLE_JAVA_BRIDGE) |
5722 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5727 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5723 #endif | 5728 #endif |
5724 } | 5729 } |
OLD | NEW |