| 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 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 | 964 |
| 965 if (ShouldDropInputEvents()) | 965 if (ShouldDropInputEvents()) |
| 966 return; | 966 return; |
| 967 | 967 |
| 968 if (touch_emulator_ && touch_emulator_->HandleMouseEvent(mouse_event)) | 968 if (touch_emulator_ && touch_emulator_->HandleMouseEvent(mouse_event)) |
| 969 return; | 969 return; |
| 970 | 970 |
| 971 MouseEventWithLatencyInfo mouse_with_latency(mouse_event, ui_latency); | 971 MouseEventWithLatencyInfo mouse_with_latency(mouse_event, ui_latency); |
| 972 latency_tracker_.OnInputEvent(mouse_event, &mouse_with_latency.latency); | 972 latency_tracker_.OnInputEvent(mouse_event, &mouse_with_latency.latency); |
| 973 input_router_->SendMouseEvent(mouse_with_latency); | 973 input_router_->SendMouseEvent(mouse_with_latency); |
| 974 | |
| 975 // Pass mouse state to gpu service if the subscribe uniform | |
| 976 // extension is enabled. | |
| 977 if (process_->SubscribeUniformEnabled()) { | |
| 978 gpu::ValueState state; | |
| 979 state.int_value[0] = mouse_event.x; | |
| 980 state.int_value[1] = mouse_event.y; | |
| 981 // TODO(orglofch) Separate the mapping of pending value states to the | |
| 982 // Gpu Service to be per RWH not per process | |
| 983 process_->SendUpdateValueState(GL_MOUSE_POSITION_CHROMIUM, state); | |
| 984 } | |
| 985 } | 974 } |
| 986 | 975 |
| 987 void RenderWidgetHostImpl::ForwardWheelEvent( | 976 void RenderWidgetHostImpl::ForwardWheelEvent( |
| 988 const WebMouseWheelEvent& wheel_event) { | 977 const WebMouseWheelEvent& wheel_event) { |
| 989 ForwardWheelEventWithLatencyInfo(wheel_event, ui::LatencyInfo()); | 978 ForwardWheelEventWithLatencyInfo(wheel_event, ui::LatencyInfo()); |
| 990 } | 979 } |
| 991 | 980 |
| 992 void RenderWidgetHostImpl::ForwardWheelEventWithLatencyInfo( | 981 void RenderWidgetHostImpl::ForwardWheelEventWithLatencyInfo( |
| 993 const blink::WebMouseWheelEvent& wheel_event, | 982 const blink::WebMouseWheelEvent& wheel_event, |
| 994 const ui::LatencyInfo& ui_latency) { | 983 const ui::LatencyInfo& ui_latency) { |
| (...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2166 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; | 2155 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; |
| 2167 } | 2156 } |
| 2168 | 2157 |
| 2169 BrowserAccessibilityManager* | 2158 BrowserAccessibilityManager* |
| 2170 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { | 2159 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { |
| 2171 return delegate_ ? | 2160 return delegate_ ? |
| 2172 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; | 2161 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; |
| 2173 } | 2162 } |
| 2174 | 2163 |
| 2175 } // namespace content | 2164 } // namespace content |
| OLD | NEW |