| 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnLockMouse) | 540 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnLockMouse) |
| 541 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse) | 541 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse) |
| 542 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDisambiguationPopup, | 542 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDisambiguationPopup, |
| 543 OnShowDisambiguationPopup) | 543 OnShowDisambiguationPopup) |
| 544 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, | 544 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, |
| 545 OnSelectionBoundsChanged) | 545 OnSelectionBoundsChanged) |
| 546 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCompositionRangeChanged, | 546 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCompositionRangeChanged, |
| 547 OnImeCompositionRangeChanged) | 547 OnImeCompositionRangeChanged) |
| 548 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFirstPaintAfterLoad, | 548 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFirstPaintAfterLoad, |
| 549 OnFirstPaintAfterLoad) | 549 OnFirstPaintAfterLoad) |
| 550 IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardCompositorProto, | |
| 551 OnForwardCompositorProto) | |
| 552 IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrames, OnSetNeedsBeginFrames) | 550 IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrames, OnSetNeedsBeginFrames) |
| 553 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) | 551 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) |
| 554 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnStartDragging) | 552 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnStartDragging) |
| 555 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) | 553 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) |
| 556 IPC_MESSAGE_UNHANDLED(handled = false) | 554 IPC_MESSAGE_UNHANDLED(handled = false) |
| 557 IPC_END_MESSAGE_MAP() | 555 IPC_END_MESSAGE_MAP() |
| 558 | 556 |
| 559 if (!handled && input_router_ && input_router_->OnMessageReceived(msg)) | 557 if (!handled && input_router_ && input_router_->OnMessageReceived(msg)) |
| 560 return true; | 558 return true; |
| 561 | 559 |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1336 else | 1334 else |
| 1337 NOTREACHED(); | 1335 NOTREACHED(); |
| 1338 | 1336 |
| 1339 // TODO(sievers): find a way to make this done another way so the method | 1337 // TODO(sievers): find a way to make this done another way so the method |
| 1340 // can be const. | 1338 // can be const. |
| 1341 latency_tracker_.set_device_scale_factor(result->device_scale_factor); | 1339 latency_tracker_.set_device_scale_factor(result->device_scale_factor); |
| 1342 if (IsUseZoomForDSFEnabled()) | 1340 if (IsUseZoomForDSFEnabled()) |
| 1343 input_router_->SetDeviceScaleFactor(result->device_scale_factor); | 1341 input_router_->SetDeviceScaleFactor(result->device_scale_factor); |
| 1344 } | 1342 } |
| 1345 | 1343 |
| 1346 void RenderWidgetHostImpl::HandleCompositorProto( | |
| 1347 const std::vector<uint8_t>& proto) { | |
| 1348 DCHECK(!proto.empty()); | |
| 1349 Send(new ViewMsg_HandleCompositorProto(GetRoutingID(), proto)); | |
| 1350 } | |
| 1351 | |
| 1352 void RenderWidgetHostImpl::DragTargetDragEnter( | 1344 void RenderWidgetHostImpl::DragTargetDragEnter( |
| 1353 const DropData& drop_data, | 1345 const DropData& drop_data, |
| 1354 const gfx::Point& client_pt, | 1346 const gfx::Point& client_pt, |
| 1355 const gfx::Point& screen_pt, | 1347 const gfx::Point& screen_pt, |
| 1356 WebDragOperationsMask operations_allowed, | 1348 WebDragOperationsMask operations_allowed, |
| 1357 int key_modifiers) { | 1349 int key_modifiers) { |
| 1358 DragTargetDragEnterWithMetaData(DropDataToMetaData(drop_data), client_pt, | 1350 DragTargetDragEnterWithMetaData(DropDataToMetaData(drop_data), client_pt, |
| 1359 screen_pt, operations_allowed, key_modifiers); | 1351 screen_pt, operations_allowed, key_modifiers); |
| 1360 } | 1352 } |
| 1361 | 1353 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 view_->SelectionChanged(text, static_cast<size_t>(offset), range); | 1461 view_->SelectionChanged(text, static_cast<size_t>(offset), range); |
| 1470 } | 1462 } |
| 1471 | 1463 |
| 1472 void RenderWidgetHostImpl::OnSelectionBoundsChanged( | 1464 void RenderWidgetHostImpl::OnSelectionBoundsChanged( |
| 1473 const ViewHostMsg_SelectionBounds_Params& params) { | 1465 const ViewHostMsg_SelectionBounds_Params& params) { |
| 1474 if (view_) { | 1466 if (view_) { |
| 1475 view_->SelectionBoundsChanged(params); | 1467 view_->SelectionBoundsChanged(params); |
| 1476 } | 1468 } |
| 1477 } | 1469 } |
| 1478 | 1470 |
| 1479 void RenderWidgetHostImpl::OnForwardCompositorProto( | |
| 1480 const std::vector<uint8_t>& proto) { | |
| 1481 if (delegate_) | |
| 1482 delegate_->ForwardCompositorProto(this, proto); | |
| 1483 } | |
| 1484 | |
| 1485 void RenderWidgetHostImpl::OnSetNeedsBeginFrames(bool needs_begin_frames) { | 1471 void RenderWidgetHostImpl::OnSetNeedsBeginFrames(bool needs_begin_frames) { |
| 1486 if (needs_begin_frames_ == needs_begin_frames) | 1472 if (needs_begin_frames_ == needs_begin_frames) |
| 1487 return; | 1473 return; |
| 1488 | 1474 |
| 1489 needs_begin_frames_ = needs_begin_frames; | 1475 needs_begin_frames_ = needs_begin_frames; |
| 1490 if (view_) | 1476 if (view_) |
| 1491 view_->SetNeedsBeginFrames(needs_begin_frames); | 1477 view_->SetNeedsBeginFrames(needs_begin_frames); |
| 1492 } | 1478 } |
| 1493 | 1479 |
| 1494 void RenderWidgetHostImpl::OnFocusedNodeTouched(bool editable) { | 1480 void RenderWidgetHostImpl::OnFocusedNodeTouched(bool editable) { |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2526 // different from the receiver's. | 2512 // different from the receiver's. |
| 2527 file_system_file.url = | 2513 file_system_file.url = |
| 2528 GURL(storage::GetIsolatedFileSystemRootURIString( | 2514 GURL(storage::GetIsolatedFileSystemRootURIString( |
| 2529 file_system_url.origin(), filesystem_id, std::string()) | 2515 file_system_url.origin(), filesystem_id, std::string()) |
| 2530 .append(register_name)); | 2516 .append(register_name)); |
| 2531 file_system_file.filesystem_id = filesystem_id; | 2517 file_system_file.filesystem_id = filesystem_id; |
| 2532 } | 2518 } |
| 2533 } | 2519 } |
| 2534 | 2520 |
| 2535 } // namespace content | 2521 } // namespace content |
| OLD | NEW |