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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 1895523002: Revert of Browser Side Text Input State Tracking for OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 (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/browser/browser_plugin/browser_plugin_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 void BrowserPluginGuest::OnShowWidget(int route_id, 972 void BrowserPluginGuest::OnShowWidget(int route_id,
973 const gfx::Rect& initial_rect) { 973 const gfx::Rect& initial_rect) {
974 GetWebContents()->ShowCreatedWidget(route_id, initial_rect); 974 GetWebContents()->ShowCreatedWidget(route_id, initial_rect);
975 } 975 }
976 976
977 void BrowserPluginGuest::OnTakeFocus(bool reverse) { 977 void BrowserPluginGuest::OnTakeFocus(bool reverse) {
978 SendMessageToEmbedder( 978 SendMessageToEmbedder(
979 new BrowserPluginMsg_AdvanceFocus(browser_plugin_instance_id(), reverse)); 979 new BrowserPluginMsg_AdvanceFocus(browser_plugin_instance_id(), reverse));
980 } 980 }
981 981
982 void BrowserPluginGuest::OnTextInputStateChanged(const TextInputState& params) { 982 void BrowserPluginGuest::OnTextInputStateChanged(
983 const ViewHostMsg_TextInputState_Params& params) {
983 // Save the state of text input so we can restore it on focus. 984 // Save the state of text input so we can restore it on focus.
984 last_text_input_state_.reset(new TextInputState(params)); 985 last_text_input_state_.reset(new ViewHostMsg_TextInputState_Params(params));
985 986
986 SendTextInputTypeChangedToView( 987 SendTextInputTypeChangedToView(
987 static_cast<RenderWidgetHostViewBase*>( 988 static_cast<RenderWidgetHostViewBase*>(
988 web_contents()->GetRenderWidgetHostView())); 989 web_contents()->GetRenderWidgetHostView()));
989 } 990 }
990 991
991 void BrowserPluginGuest::OnImeCancelComposition() { 992 void BrowserPluginGuest::OnImeCancelComposition() {
992 static_cast<RenderWidgetHostViewBase*>( 993 static_cast<RenderWidgetHostViewBase*>(
993 web_contents()->GetRenderWidgetHostView())->ImeCancelComposition(); 994 web_contents()->GetRenderWidgetHostView())->ImeCancelComposition();
994 } 995 }
995 996
996 #if defined(OS_MACOSX) || defined(USE_AURA) 997 #if defined(OS_MACOSX) || defined(USE_AURA)
997 void BrowserPluginGuest::OnImeCompositionRangeChanged( 998 void BrowserPluginGuest::OnImeCompositionRangeChanged(
998 const gfx::Range& range, 999 const gfx::Range& range,
999 const std::vector<gfx::Rect>& character_bounds) { 1000 const std::vector<gfx::Rect>& character_bounds) {
1000 static_cast<RenderWidgetHostViewBase*>( 1001 static_cast<RenderWidgetHostViewBase*>(
1001 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( 1002 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged(
1002 range, character_bounds); 1003 range, character_bounds);
1003 } 1004 }
1004 #endif 1005 #endif
1005 1006
1006 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { 1007 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) {
1007 if (delegate_) 1008 if (delegate_)
1008 delegate_->SetContextMenuPosition(position); 1009 delegate_->SetContextMenuPosition(position);
1009 } 1010 }
1010 1011
1011 } // namespace content 1012 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.h ('k') | content/browser/frame_host/interstitial_page_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698