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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 void RenderFrameImpl::PepperDidReceiveMouseEvent( | 505 void RenderFrameImpl::PepperDidReceiveMouseEvent( |
506 PepperPluginInstanceImpl* instance) { | 506 PepperPluginInstanceImpl* instance) { |
507 render_view_->set_pepper_last_mouse_event_target(instance); | 507 render_view_->set_pepper_last_mouse_event_target(instance); |
508 } | 508 } |
509 | 509 |
510 void RenderFrameImpl::PepperTextInputTypeChanged( | 510 void RenderFrameImpl::PepperTextInputTypeChanged( |
511 PepperPluginInstanceImpl* instance) { | 511 PepperPluginInstanceImpl* instance) { |
512 if (instance != render_view_->focused_pepper_plugin()) | 512 if (instance != render_view_->focused_pepper_plugin()) |
513 return; | 513 return; |
514 | 514 |
515 GetRenderWidget()->UpdateTextInputType(); | 515 GetRenderWidget()->UpdateTextInputState( |
| 516 RenderWidget::NO_SHOW_IME, RenderWidget::FROM_NON_IME); |
516 if (render_view_->renderer_accessibility()) | 517 if (render_view_->renderer_accessibility()) |
517 render_view_->renderer_accessibility()->FocusedNodeChanged(WebNode()); | 518 render_view_->renderer_accessibility()->FocusedNodeChanged(WebNode()); |
518 } | 519 } |
519 | 520 |
520 void RenderFrameImpl::PepperCaretPositionChanged( | 521 void RenderFrameImpl::PepperCaretPositionChanged( |
521 PepperPluginInstanceImpl* instance) { | 522 PepperPluginInstanceImpl* instance) { |
522 if (instance != render_view_->focused_pepper_plugin()) | 523 if (instance != render_view_->focused_pepper_plugin()) |
523 return; | 524 return; |
524 GetRenderWidget()->UpdateSelectionBounds(); | 525 GetRenderWidget()->UpdateSelectionBounds(); |
525 } | 526 } |
(...skipping 1669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2195 return notification_provider_; | 2196 return notification_provider_; |
2196 } | 2197 } |
2197 | 2198 |
2198 void RenderFrameImpl::didChangeSelection(bool is_empty_selection) { | 2199 void RenderFrameImpl::didChangeSelection(bool is_empty_selection) { |
2199 if (!GetRenderWidget()->handling_input_event() && !handling_select_range_) | 2200 if (!GetRenderWidget()->handling_input_event() && !handling_select_range_) |
2200 return; | 2201 return; |
2201 | 2202 |
2202 if (is_empty_selection) | 2203 if (is_empty_selection) |
2203 selection_text_.clear(); | 2204 selection_text_.clear(); |
2204 | 2205 |
2205 // UpdateTextInputType should be called before SyncSelectionIfRequired. | 2206 // UpdateTextInputState should be called before SyncSelectionIfRequired. |
2206 // UpdateTextInputType may send TextInputTypeChanged to notify the focus | 2207 // UpdateTextInputState may send TextInputStateChanged to notify the focus |
2207 // was changed, and SyncSelectionIfRequired may send SelectionChanged | 2208 // was changed, and SyncSelectionIfRequired may send SelectionChanged |
2208 // to notify the selection was changed. Focus change should be notified | 2209 // to notify the selection was changed. Focus change should be notified |
2209 // before selection change. | 2210 // before selection change. |
2210 GetRenderWidget()->UpdateTextInputType(); | 2211 GetRenderWidget()->UpdateTextInputState( |
| 2212 RenderWidget::NO_SHOW_IME, RenderWidget::FROM_NON_IME); |
2211 SyncSelectionIfRequired(); | 2213 SyncSelectionIfRequired(); |
2212 #if defined(OS_ANDROID) | |
2213 GetRenderWidget()->UpdateTextInputState(RenderWidget::NO_SHOW_IME, | |
2214 RenderWidget::FROM_NON_IME); | |
2215 #endif | |
2216 } | 2214 } |
2217 | 2215 |
2218 blink::WebColorChooser* RenderFrameImpl::createColorChooser( | 2216 blink::WebColorChooser* RenderFrameImpl::createColorChooser( |
2219 blink::WebColorChooserClient* client, | 2217 blink::WebColorChooserClient* client, |
2220 const blink::WebColor& initial_color, | 2218 const blink::WebColor& initial_color, |
2221 const blink::WebVector<blink::WebColorSuggestion>& suggestions) { | 2219 const blink::WebVector<blink::WebColorSuggestion>& suggestions) { |
2222 RendererWebColorChooserImpl* color_chooser = | 2220 RendererWebColorChooserImpl* color_chooser = |
2223 new RendererWebColorChooserImpl(this, client); | 2221 new RendererWebColorChooserImpl(this, client); |
2224 std::vector<content::ColorSuggestion> color_suggestions; | 2222 std::vector<content::ColorSuggestion> color_suggestions; |
2225 for (size_t i = 0; i < suggestions.size(); i++) { | 2223 for (size_t i = 0; i < suggestions.size(); i++) { |
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3563 | 3561 |
3564 #if defined(ENABLE_BROWSER_CDMS) | 3562 #if defined(ENABLE_BROWSER_CDMS) |
3565 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 3563 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
3566 if (!cdm_manager_) | 3564 if (!cdm_manager_) |
3567 cdm_manager_ = new RendererCdmManager(this); | 3565 cdm_manager_ = new RendererCdmManager(this); |
3568 return cdm_manager_; | 3566 return cdm_manager_; |
3569 } | 3567 } |
3570 #endif // defined(ENABLE_BROWSER_CDMS) | 3568 #endif // defined(ENABLE_BROWSER_CDMS) |
3571 | 3569 |
3572 } // namespace content | 3570 } // namespace content |
OLD | NEW |