Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2596193002: Clean up names and remove unnecessary parameter (Closed)
Patch Set: change show_ime to show_virtual_keyboard in the renderer Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 void RenderFrameImpl::PepperDidReceiveMouseEvent( 1299 void RenderFrameImpl::PepperDidReceiveMouseEvent(
1300 PepperPluginInstanceImpl* instance) { 1300 PepperPluginInstanceImpl* instance) {
1301 set_pepper_last_mouse_event_target(instance); 1301 set_pepper_last_mouse_event_target(instance);
1302 } 1302 }
1303 1303
1304 void RenderFrameImpl::PepperTextInputTypeChanged( 1304 void RenderFrameImpl::PepperTextInputTypeChanged(
1305 PepperPluginInstanceImpl* instance) { 1305 PepperPluginInstanceImpl* instance) {
1306 if (instance != focused_pepper_plugin_) 1306 if (instance != focused_pepper_plugin_)
1307 return; 1307 return;
1308 1308
1309 GetRenderWidget()->UpdateTextInputState(ShowIme::HIDE_IME, 1309 GetRenderWidget()->UpdateTextInputState();
1310 ChangeSource::FROM_NON_IME);
1311 1310
1312 FocusedNodeChangedForAccessibility(WebNode()); 1311 FocusedNodeChangedForAccessibility(WebNode());
1313 } 1312 }
1314 1313
1315 void RenderFrameImpl::PepperCaretPositionChanged( 1314 void RenderFrameImpl::PepperCaretPositionChanged(
1316 PepperPluginInstanceImpl* instance) { 1315 PepperPluginInstanceImpl* instance) {
1317 if (instance != focused_pepper_plugin_) 1316 if (instance != focused_pepper_plugin_)
1318 return; 1317 return;
1319 GetRenderWidget()->UpdateSelectionBounds(); 1318 GetRenderWidget()->UpdateSelectionBounds();
1320 } 1319 }
(...skipping 2679 matching lines...) Expand 10 before | Expand all | Expand 10 after
4000 return; 3999 return;
4001 4000
4002 if (is_empty_selection) 4001 if (is_empty_selection)
4003 selection_text_.clear(); 4002 selection_text_.clear();
4004 4003
4005 // UpdateTextInputState should be called before SyncSelectionIfRequired. 4004 // UpdateTextInputState should be called before SyncSelectionIfRequired.
4006 // UpdateTextInputState may send TextInputStateChanged to notify the focus 4005 // UpdateTextInputState may send TextInputStateChanged to notify the focus
4007 // was changed, and SyncSelectionIfRequired may send SelectionChanged 4006 // was changed, and SyncSelectionIfRequired may send SelectionChanged
4008 // to notify the selection was changed. Focus change should be notified 4007 // to notify the selection was changed. Focus change should be notified
4009 // before selection change. 4008 // before selection change.
4010 GetRenderWidget()->UpdateTextInputState(ShowIme::HIDE_IME, 4009 GetRenderWidget()->UpdateTextInputState();
4011 ChangeSource::FROM_NON_IME);
4012 SyncSelectionIfRequired(); 4010 SyncSelectionIfRequired();
4013 } 4011 }
4014 4012
4015 bool RenderFrameImpl::handleCurrentKeyboardEvent() { 4013 bool RenderFrameImpl::handleCurrentKeyboardEvent() {
4016 bool did_execute_command = false; 4014 bool did_execute_command = false;
4017 for (auto command : GetRenderWidget()->edit_commands()) { 4015 for (auto command : GetRenderWidget()->edit_commands()) {
4018 // In gtk and cocoa, it's possible to bind multiple edit commands to one 4016 // In gtk and cocoa, it's possible to bind multiple edit commands to one
4019 // key (but it's the exception). Once one edit command is not executed, it 4017 // key (but it's the exception). Once one edit command is not executed, it
4020 // seems safest to not execute the rest. 4018 // seems safest to not execute the rest.
4021 if (!frame_->executeCommand(blink::WebString::fromUTF8(command.name), 4019 if (!frame_->executeCommand(blink::WebString::fromUTF8(command.name),
(...skipping 2681 matching lines...) Expand 10 before | Expand all | Expand 10 after
6703 6701
6704 void RenderFrameImpl::PepperFocusChanged(PepperPluginInstanceImpl* instance, 6702 void RenderFrameImpl::PepperFocusChanged(PepperPluginInstanceImpl* instance,
6705 bool focused) { 6703 bool focused) {
6706 if (focused) 6704 if (focused)
6707 focused_pepper_plugin_ = instance; 6705 focused_pepper_plugin_ = instance;
6708 else if (focused_pepper_plugin_ == instance) 6706 else if (focused_pepper_plugin_ == instance)
6709 focused_pepper_plugin_ = nullptr; 6707 focused_pepper_plugin_ = nullptr;
6710 6708
6711 GetRenderWidget()->set_focused_pepper_plugin(focused_pepper_plugin_); 6709 GetRenderWidget()->set_focused_pepper_plugin(focused_pepper_plugin_);
6712 6710
6713 GetRenderWidget()->UpdateTextInputState(ShowIme::HIDE_IME, 6711 GetRenderWidget()->UpdateTextInputState();
6714 ChangeSource::FROM_NON_IME);
6715 GetRenderWidget()->UpdateSelectionBounds(); 6712 GetRenderWidget()->UpdateSelectionBounds();
6716 } 6713 }
6717 6714
6718 void RenderFrameImpl::PepperStartsPlayback(PepperPluginInstanceImpl* instance) { 6715 void RenderFrameImpl::PepperStartsPlayback(PepperPluginInstanceImpl* instance) {
6719 RenderFrameImpl* const render_frame = instance->render_frame(); 6716 RenderFrameImpl* const render_frame = instance->render_frame();
6720 if (render_frame) { 6717 if (render_frame) {
6721 render_frame->Send( 6718 render_frame->Send(
6722 new FrameHostMsg_PepperStartsPlayback( 6719 new FrameHostMsg_PepperStartsPlayback(
6723 render_frame->GetRoutingID(), 6720 render_frame->GetRoutingID(),
6724 instance->pp_instance())); 6721 instance->pp_instance()));
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
6776 // event target. Potentially a Pepper plugin will receive the event. 6773 // event target. Potentially a Pepper plugin will receive the event.
6777 // In order to tell whether a plugin gets the last mouse event and which it 6774 // In order to tell whether a plugin gets the last mouse event and which it
6778 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6775 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6779 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6776 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6780 // |pepper_last_mouse_event_target_|. 6777 // |pepper_last_mouse_event_target_|.
6781 pepper_last_mouse_event_target_ = nullptr; 6778 pepper_last_mouse_event_target_ = nullptr;
6782 #endif 6779 #endif
6783 } 6780 }
6784 6781
6785 } // namespace content 6782 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698