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

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

Issue 2623483003: Support tracking focused node element for OOPIFs. (Closed)
Patch Set: Added the missing forward declaration 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 return; 2171 return;
2172 if (event.type == WebInputEvent::GestureTap) { 2172 if (event.type == WebInputEvent::GestureTap) {
2173 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME); 2173 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME);
2174 } else if (event.type == WebInputEvent::GestureLongPress) { 2174 } else if (event.type == WebInputEvent::GestureLongPress) {
2175 DCHECK(GetWebWidget()); 2175 DCHECK(GetWebWidget());
2176 if (GetWebWidget()->textInputInfo().value.isEmpty()) 2176 if (GetWebWidget()->textInputInfo().value.isEmpty())
2177 UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME); 2177 UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME);
2178 else 2178 else
2179 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME); 2179 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME);
2180 } 2180 }
2181 // TODO(ananta): Piggyback off existing IPCs to communicate this information,
2182 // crbug/420130.
2183 #if defined(OS_WIN)
2184 if (event.type != blink::WebGestureEvent::GestureTap)
2185 return;
2186
2187 // TODO(estade): hit test the event against focused node to make sure
2188 // the tap actually hit the focused node.
2189 blink::WebTextInputType text_input_type = GetWebWidget()->textInputType();
2190
2191 Send(new ViewHostMsg_FocusedNodeTouched(
2192 routing_id_, text_input_type != blink::WebTextInputTypeNone));
2193 #endif
2181 #endif 2194 #endif
2182 } 2195 }
2183 2196
2184 void RenderWidget::didOverscroll( 2197 void RenderWidget::didOverscroll(
2185 const blink::WebFloatSize& overscrollDelta, 2198 const blink::WebFloatSize& overscrollDelta,
2186 const blink::WebFloatSize& accumulatedOverscroll, 2199 const blink::WebFloatSize& accumulatedOverscroll,
2187 const blink::WebFloatPoint& position, 2200 const blink::WebFloatPoint& position,
2188 const blink::WebFloatSize& velocity) { 2201 const blink::WebFloatSize& velocity) {
2189 #if defined(OS_MACOSX) 2202 #if defined(OS_MACOSX)
2190 // On OSX the user can disable the elastic overscroll effect. If that's the 2203 // On OSX the user can disable the elastic overscroll effect. If that's the
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 // browser side (https://crbug.com/669219). 2324 // browser side (https://crbug.com/669219).
2312 // If there is no WebFrameWidget, then there will be no 2325 // If there is no WebFrameWidget, then there will be no
2313 // InputMethodControllers for a WebLocalFrame. 2326 // InputMethodControllers for a WebLocalFrame.
2314 return nullptr; 2327 return nullptr;
2315 } 2328 }
2316 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) 2329 return static_cast<blink::WebFrameWidget*>(GetWebWidget())
2317 ->getActiveWebInputMethodController(); 2330 ->getActiveWebInputMethodController();
2318 } 2331 }
2319 2332
2320 } // namespace content 2333 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698