| 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 <tuple> | 10 #include <tuple> |
| (...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1308 std::move(synthetic_gesture), on_complete); | 1308 std::move(synthetic_gesture), on_complete); |
| 1309 } | 1309 } |
| 1310 } | 1310 } |
| 1311 | 1311 |
| 1312 void RenderWidgetHostImpl::SetCursor(const WebCursor& cursor) { | 1312 void RenderWidgetHostImpl::SetCursor(const WebCursor& cursor) { |
| 1313 if (!view_) | 1313 if (!view_) |
| 1314 return; | 1314 return; |
| 1315 view_->UpdateCursor(cursor); | 1315 view_->UpdateCursor(cursor); |
| 1316 } | 1316 } |
| 1317 | 1317 |
| 1318 void RenderWidgetHostImpl::ShowContextMenuAtPoint(const gfx::Point& point) { | 1318 void RenderWidgetHostImpl::ShowContextMenuAtPoint(const gfx::Point& point, |
| 1319 Send(new ViewMsg_ShowContextMenu( | 1319 bool from_touch_handle) { |
| 1320 GetRoutingID(), ui::MENU_SOURCE_MOUSE, point)); | 1320 const ui::MenuSourceType menu_source_type = |
| 1321 from_touch_handle ? ui::MENU_SOURCE_TOUCH_HANDLE : ui::MENU_SOURCE_MOUSE; |
| 1322 Send(new ViewMsg_ShowContextMenu(GetRoutingID(), menu_source_type, point)); |
| 1321 } | 1323 } |
| 1322 | 1324 |
| 1323 void RenderWidgetHostImpl::SendCursorVisibilityState(bool is_visible) { | 1325 void RenderWidgetHostImpl::SendCursorVisibilityState(bool is_visible) { |
| 1324 Send(new InputMsg_CursorVisibilityChange(GetRoutingID(), is_visible)); | 1326 Send(new InputMsg_CursorVisibilityChange(GetRoutingID(), is_visible)); |
| 1325 } | 1327 } |
| 1326 | 1328 |
| 1327 int64_t RenderWidgetHostImpl::GetLatencyComponentId() const { | 1329 int64_t RenderWidgetHostImpl::GetLatencyComponentId() const { |
| 1328 return latency_tracker_.latency_component_id(); | 1330 return latency_tracker_.latency_component_id(); |
| 1329 } | 1331 } |
| 1330 | 1332 |
| (...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2629 RenderProcessHost* rph = GetProcess(); | 2631 RenderProcessHost* rph = GetProcess(); |
| 2630 for (std::vector<IPC::Message>::const_iterator i = messages.begin(); | 2632 for (std::vector<IPC::Message>::const_iterator i = messages.begin(); |
| 2631 i != messages.end(); ++i) { | 2633 i != messages.end(); ++i) { |
| 2632 rph->OnMessageReceived(*i); | 2634 rph->OnMessageReceived(*i); |
| 2633 if (i->dispatch_error()) | 2635 if (i->dispatch_error()) |
| 2634 rph->OnBadMessageReceived(*i); | 2636 rph->OnBadMessageReceived(*i); |
| 2635 } | 2637 } |
| 2636 } | 2638 } |
| 2637 | 2639 |
| 2638 } // namespace content | 2640 } // namespace content |
| OLD | NEW |