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/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1969 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) { | 1969 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) { |
1970 #if defined(TOOLKIT_GTK) | 1970 #if defined(TOOLKIT_GTK) |
1971 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1971 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
1972 #endif | 1972 #endif |
1973 } | 1973 } |
1974 | 1974 |
1975 deferred_plugin_handles_.clear(); | 1975 deferred_plugin_handles_.clear(); |
1976 #endif | 1976 #endif |
1977 } | 1977 } |
1978 | 1978 |
1979 const gfx::Point& RenderWidgetHostImpl::GetLastScrollOffset() const { | 1979 const gfx::Vector2d& RenderWidgetHostImpl::GetLastScrollOffset() const { |
1980 return last_scroll_offset_; | 1980 return last_scroll_offset_; |
1981 } | 1981 } |
1982 | 1982 |
1983 bool RenderWidgetHostImpl::ShouldForwardTouchEvent() const { | 1983 bool RenderWidgetHostImpl::ShouldForwardTouchEvent() const { |
1984 // Always send a touch event if the renderer has a touch-event handler. It is | 1984 // Always send a touch event if the renderer has a touch-event handler. It is |
1985 // possible that a renderer stops listening to touch-events while there are | 1985 // possible that a renderer stops listening to touch-events while there are |
1986 // still events in the touch-queue. In such cases, the new events should still | 1986 // still events in the touch-queue. In such cases, the new events should still |
1987 // get into the queue. | 1987 // get into the queue. |
1988 return has_touch_handler_ || !touch_event_queue_->empty(); | 1988 return has_touch_handler_ || !touch_event_queue_->empty(); |
1989 } | 1989 } |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2169 return; | 2169 return; |
2170 | 2170 |
2171 OnRenderAutoResized(new_size); | 2171 OnRenderAutoResized(new_size); |
2172 } | 2172 } |
2173 | 2173 |
2174 void RenderWidgetHostImpl::DetachDelegate() { | 2174 void RenderWidgetHostImpl::DetachDelegate() { |
2175 delegate_ = NULL; | 2175 delegate_ = NULL; |
2176 } | 2176 } |
2177 | 2177 |
2178 } // namespace content | 2178 } // namespace content |
OLD | NEW |