| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 render_view_->OnImeSetComposition( | 727 render_view_->OnImeSetComposition( |
| 728 text, underlines, selection_start, selection_end); | 728 text, underlines, selection_start, selection_end); |
| 729 } | 729 } |
| 730 | 730 |
| 731 void RenderFrameImpl::SimulateImeConfirmComposition( | 731 void RenderFrameImpl::SimulateImeConfirmComposition( |
| 732 const base::string16& text, | 732 const base::string16& text, |
| 733 const gfx::Range& replacement_range) { | 733 const gfx::Range& replacement_range) { |
| 734 render_view_->OnImeConfirmComposition(text, replacement_range, false); | 734 render_view_->OnImeConfirmComposition(text, replacement_range, false); |
| 735 } | 735 } |
| 736 | 736 |
| 737 | |
| 738 void RenderFrameImpl::OnImeSetComposition( | 737 void RenderFrameImpl::OnImeSetComposition( |
| 739 const base::string16& text, | 738 const base::string16& text, |
| 740 const std::vector<blink::WebCompositionUnderline>& underlines, | 739 const std::vector<blink::WebCompositionUnderline>& underlines, |
| 741 int selection_start, | 740 int selection_start, |
| 742 int selection_end) { | 741 int selection_end) { |
| 743 // When a PPAPI plugin has focus, we bypass WebKit. | 742 // When a PPAPI plugin has focus, we bypass WebKit. |
| 744 if (!IsPepperAcceptingCompositionEvents()) { | 743 if (!IsPepperAcceptingCompositionEvents()) { |
| 745 pepper_composition_text_ = text; | 744 pepper_composition_text_ = text; |
| 746 } else { | 745 } else { |
| 747 // TODO(kinaba) currently all composition events are sent directly to | 746 // TODO(kinaba) currently all composition events are sent directly to |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 } | 806 } |
| 808 } else { | 807 } else { |
| 809 // Mimics the order of events sent by WebKit. | 808 // Mimics the order of events sent by WebKit. |
| 810 // See WebCore::Editor::setComposition() for the corresponding code. | 809 // See WebCore::Editor::setComposition() for the corresponding code. |
| 811 render_view_->focused_pepper_plugin()->HandleCompositionEnd(last_text); | 810 render_view_->focused_pepper_plugin()->HandleCompositionEnd(last_text); |
| 812 render_view_->focused_pepper_plugin()->HandleTextInput(last_text); | 811 render_view_->focused_pepper_plugin()->HandleTextInput(last_text); |
| 813 } | 812 } |
| 814 pepper_composition_text_.clear(); | 813 pepper_composition_text_.clear(); |
| 815 } | 814 } |
| 816 | 815 |
| 817 #endif // ENABLE_PLUGINS | 816 #endif // defined(ENABLE_PLUGINS) |
| 818 | 817 |
| 819 MediaStreamDispatcher* RenderFrameImpl::GetMediaStreamDispatcher() { | 818 MediaStreamDispatcher* RenderFrameImpl::GetMediaStreamDispatcher() { |
| 820 if (!web_user_media_client_) | 819 if (!web_user_media_client_) |
| 821 InitializeUserMediaClient(); | 820 InitializeUserMediaClient(); |
| 822 return web_user_media_client_ ? | 821 return web_user_media_client_ ? |
| 823 web_user_media_client_->media_stream_dispatcher() : NULL; | 822 web_user_media_client_->media_stream_dispatcher() : NULL; |
| 824 } | 823 } |
| 825 | 824 |
| 826 bool RenderFrameImpl::Send(IPC::Message* message) { | 825 bool RenderFrameImpl::Send(IPC::Message* message) { |
| 827 if (is_detaching_) { | 826 if (is_detaching_) { |
| (...skipping 3298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4126 | 4125 |
| 4127 #if defined(ENABLE_BROWSER_CDMS) | 4126 #if defined(ENABLE_BROWSER_CDMS) |
| 4128 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 4127 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
| 4129 if (!cdm_manager_) | 4128 if (!cdm_manager_) |
| 4130 cdm_manager_ = new RendererCdmManager(this); | 4129 cdm_manager_ = new RendererCdmManager(this); |
| 4131 return cdm_manager_; | 4130 return cdm_manager_; |
| 4132 } | 4131 } |
| 4133 #endif // defined(ENABLE_BROWSER_CDMS) | 4132 #endif // defined(ENABLE_BROWSER_CDMS) |
| 4134 | 4133 |
| 4135 } // namespace content | 4134 } // namespace content |
| OLD | NEW |