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