Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1951 ui::Range range(ui::Range::InvalidRange()); | 1951 ui::Range range(ui::Range::InvalidRange()); |
| 1952 size_t location, length; | 1952 size_t location, length; |
| 1953 if (webwidget_->caretOrSelectionRange(&location, &length)) { | 1953 if (webwidget_->caretOrSelectionRange(&location, &length)) { |
| 1954 range.set_start(location); | 1954 range.set_start(location); |
| 1955 range.set_end(location + length); | 1955 range.set_end(location + length); |
| 1956 } | 1956 } |
| 1957 | 1957 |
| 1958 UpdateCompositionInfo(range, std::vector<gfx::Rect>()); | 1958 UpdateCompositionInfo(range, std::vector<gfx::Rect>()); |
| 1959 } | 1959 } |
| 1960 | 1960 |
| 1961 void RenderWidget::didHandleGestureEvent( | |
| 1962 const WebGestureEvent& event, | |
| 1963 EventStatus event_status) { | |
| 1964 #if defined(OS_ANDROID) | |
| 1965 if (event_status == EventStatusCancelled) | |
|
darin (slow to review)
2013/01/15 23:06:03
why did you plumb an EventStatus enum if you only
| |
| 1966 return; | |
| 1967 if (event.type == WebInputEvent::GestureTap || | |
| 1968 event.type == WebInputEvent::GestureLongPress) { | |
| 1969 UpdateTextInputState(SHOW_IME_IF_NEEDED); | |
| 1970 } | |
| 1971 #endif | |
| 1972 } | |
| 1973 | |
| 1961 void RenderWidget::SchedulePluginMove( | 1974 void RenderWidget::SchedulePluginMove( |
| 1962 const webkit::npapi::WebPluginGeometry& move) { | 1975 const webkit::npapi::WebPluginGeometry& move) { |
| 1963 size_t i = 0; | 1976 size_t i = 0; |
| 1964 for (; i < plugin_window_moves_.size(); ++i) { | 1977 for (; i < plugin_window_moves_.size(); ++i) { |
| 1965 if (plugin_window_moves_[i].window == move.window) { | 1978 if (plugin_window_moves_[i].window == move.window) { |
| 1966 if (move.rects_valid) { | 1979 if (move.rects_valid) { |
| 1967 plugin_window_moves_[i] = move; | 1980 plugin_window_moves_[i] = move; |
| 1968 } else { | 1981 } else { |
| 1969 plugin_window_moves_[i].visible = move.visible; | 1982 plugin_window_moves_[i].visible = move.visible; |
| 1970 } | 1983 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2042 | 2055 |
| 2043 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 2056 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
| 2044 return false; | 2057 return false; |
| 2045 } | 2058 } |
| 2046 | 2059 |
| 2047 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { | 2060 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { |
| 2048 return true; | 2061 return true; |
| 2049 } | 2062 } |
| 2050 | 2063 |
| 2051 } // namespace content | 2064 } // namespace content |
| OLD | NEW |