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

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

Issue 484653003: Fixed the inconsistent behavior when long pressing on editable area in Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | 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 "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 UpdateCompositionInfo(true); 1960 UpdateCompositionInfo(true);
1961 #endif 1961 #endif
1962 } 1962 }
1963 1963
1964 void RenderWidget::didHandleGestureEvent( 1964 void RenderWidget::didHandleGestureEvent(
1965 const WebGestureEvent& event, 1965 const WebGestureEvent& event,
1966 bool event_cancelled) { 1966 bool event_cancelled) {
1967 #if defined(OS_ANDROID) || defined(USE_AURA) 1967 #if defined(OS_ANDROID) || defined(USE_AURA)
1968 if (event_cancelled) 1968 if (event_cancelled)
1969 return; 1969 return;
1970 if (event.type == WebInputEvent::GestureTap || 1970 if (event.type == WebInputEvent::GestureTap) {
1971 event.type == WebInputEvent::GestureLongPress) {
1972 UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME); 1971 UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME);
1972 } else if (event.type == WebInputEvent::GestureLongPress) {
1973 blink::WebTextInputInfo new_info;
1974 if (webwidget_)
1975 new_info = webwidget_->textInputInfo();
1976 if (!new_info.value.isEmpty())
1977 UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME);
aurimas (slooooooooow) 2014/08/18 16:05:24 Conditionally calling UpdateTextInputState will ca
AKVT 2014/08/18 16:14:30 Thanks. In that case, how do we overcome this prob
1973 } 1978 }
1974 #endif 1979 #endif
1975 } 1980 }
1976 1981
1977 void RenderWidget::StartCompositor() { 1982 void RenderWidget::StartCompositor() {
1978 // For widgets that are never visible, we don't need the compositor to run 1983 // For widgets that are never visible, we don't need the compositor to run
1979 // at all. 1984 // at all.
1980 if (never_visible_) 1985 if (never_visible_)
1981 return; 1986 return;
1982 compositor_->setSurfaceReady(); 1987 compositor_->setSurfaceReady();
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2161 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2157 video_hole_frames_.AddObserver(frame); 2162 video_hole_frames_.AddObserver(frame);
2158 } 2163 }
2159 2164
2160 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2165 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2161 video_hole_frames_.RemoveObserver(frame); 2166 video_hole_frames_.RemoveObserver(frame);
2162 } 2167 }
2163 #endif // defined(VIDEO_HOLE) 2168 #endif // defined(VIDEO_HOLE)
2164 2169
2165 } // namespace content 2170 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698