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

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

Issue 11473027: [Android] Should not update IME status when gesture needs to be disambiguated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change API again in https://bugs.webkit.org/show_bug.cgi?id=107605 Created 7 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 (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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after
1953 ui::Range range(ui::Range::InvalidRange()); 1953 ui::Range range(ui::Range::InvalidRange());
1954 size_t location, length; 1954 size_t location, length;
1955 if (webwidget_->caretOrSelectionRange(&location, &length)) { 1955 if (webwidget_->caretOrSelectionRange(&location, &length)) {
1956 range.set_start(location); 1956 range.set_start(location);
1957 range.set_end(location + length); 1957 range.set_end(location + length);
1958 } 1958 }
1959 1959
1960 UpdateCompositionInfo(range, std::vector<gfx::Rect>()); 1960 UpdateCompositionInfo(range, std::vector<gfx::Rect>());
1961 } 1961 }
1962 1962
1963 void RenderWidget::didHandleGestureEvent(
1964 const WebGestureEvent& event,
1965 bool event_cancelled) {
1966 #if defined(OS_ANDROID)
1967 if (event_cancelled)
1968 return;
1969 if (event.type == WebInputEvent::GestureTap ||
1970 event.type == WebInputEvent::GestureLongPress) {
1971 UpdateTextInputState(SHOW_IME_IF_NEEDED);
1972 }
1973 #endif
1974 }
1975
1963 void RenderWidget::SchedulePluginMove( 1976 void RenderWidget::SchedulePluginMove(
1964 const webkit::npapi::WebPluginGeometry& move) { 1977 const webkit::npapi::WebPluginGeometry& move) {
1965 size_t i = 0; 1978 size_t i = 0;
1966 for (; i < plugin_window_moves_.size(); ++i) { 1979 for (; i < plugin_window_moves_.size(); ++i) {
1967 if (plugin_window_moves_[i].window == move.window) { 1980 if (plugin_window_moves_[i].window == move.window) {
1968 if (move.rects_valid) { 1981 if (move.rects_valid) {
1969 plugin_window_moves_[i] = move; 1982 plugin_window_moves_[i] = move;
1970 } else { 1983 } else {
1971 plugin_window_moves_[i].visible = move.visible; 1984 plugin_window_moves_[i].visible = move.visible;
1972 } 1985 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
2044 2057
2045 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 2058 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
2046 return false; 2059 return false;
2047 } 2060 }
2048 2061
2049 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { 2062 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const {
2050 return true; 2063 return true;
2051 } 2064 }
2052 2065
2053 } // namespace content 2066 } // namespace content
OLDNEW
« content/renderer/render_widget.h ('K') | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698