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 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 std::move(synthetic_gesture), on_complete); | 1309 std::move(synthetic_gesture), on_complete); |
1310 } | 1310 } |
1311 } | 1311 } |
1312 | 1312 |
1313 void RenderWidgetHostImpl::SetCursor(const WebCursor& cursor) { | 1313 void RenderWidgetHostImpl::SetCursor(const WebCursor& cursor) { |
1314 if (!view_) | 1314 if (!view_) |
1315 return; | 1315 return; |
1316 view_->UpdateCursor(cursor); | 1316 view_->UpdateCursor(cursor); |
1317 } | 1317 } |
1318 | 1318 |
1319 void RenderWidgetHostImpl::ShowContextMenuAtPoint(const gfx::Point& point) { | 1319 void RenderWidgetHostImpl::ShowContextMenuAtPoint(const gfx::Point& point, |
1320 Send(new ViewMsg_ShowContextMenu( | 1320 bool from_touch) { |
1321 GetRoutingID(), ui::MENU_SOURCE_MOUSE, point)); | 1321 const ui::MenuSourceType menu_source_type = |
| 1322 from_touch ? ui::MENU_SOURCE_TOUCH : ui::MENU_SOURCE_MOUSE; |
| 1323 Send(new ViewMsg_ShowContextMenu(GetRoutingID(), menu_source_type, point)); |
1322 } | 1324 } |
1323 | 1325 |
1324 void RenderWidgetHostImpl::SendCursorVisibilityState(bool is_visible) { | 1326 void RenderWidgetHostImpl::SendCursorVisibilityState(bool is_visible) { |
1325 Send(new InputMsg_CursorVisibilityChange(GetRoutingID(), is_visible)); | 1327 Send(new InputMsg_CursorVisibilityChange(GetRoutingID(), is_visible)); |
1326 } | 1328 } |
1327 | 1329 |
1328 int64_t RenderWidgetHostImpl::GetLatencyComponentId() const { | 1330 int64_t RenderWidgetHostImpl::GetLatencyComponentId() const { |
1329 return latency_tracker_.latency_component_id(); | 1331 return latency_tracker_.latency_component_id(); |
1330 } | 1332 } |
1331 | 1333 |
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2737 RenderProcessHost* rph = GetProcess(); | 2739 RenderProcessHost* rph = GetProcess(); |
2738 for (std::vector<IPC::Message>::const_iterator i = messages.begin(); | 2740 for (std::vector<IPC::Message>::const_iterator i = messages.begin(); |
2739 i != messages.end(); ++i) { | 2741 i != messages.end(); ++i) { |
2740 rph->OnMessageReceived(*i); | 2742 rph->OnMessageReceived(*i); |
2741 if (i->dispatch_error()) | 2743 if (i->dispatch_error()) |
2742 rph->OnBadMessageReceived(*i); | 2744 rph->OnBadMessageReceived(*i); |
2743 } | 2745 } |
2744 } | 2746 } |
2745 | 2747 |
2746 } // namespace content | 2748 } // namespace content |
OLD | NEW |