| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame_host/render_widget_host_view_child_frame.h" | 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 void RenderWidgetHostViewChildFrame::ProcessAckedTouchEvent( | 469 void RenderWidgetHostViewChildFrame::ProcessAckedTouchEvent( |
| 470 const TouchEventWithLatencyInfo& touch, | 470 const TouchEventWithLatencyInfo& touch, |
| 471 InputEventAckState ack_result) { | 471 InputEventAckState ack_result) { |
| 472 if (!frame_connector_) | 472 if (!frame_connector_) |
| 473 return; | 473 return; |
| 474 | 474 |
| 475 frame_connector_->ForwardProcessAckedTouchEvent(touch, ack_result); | 475 frame_connector_->ForwardProcessAckedTouchEvent(touch, ack_result); |
| 476 } | 476 } |
| 477 | 477 |
| 478 bool RenderWidgetHostViewChildFrame::LockMouse() { | 478 bool RenderWidgetHostViewChildFrame::LockMouse() { |
| 479 if (frame_connector_) |
| 480 return frame_connector_->LockMouse(); |
| 479 return false; | 481 return false; |
| 480 } | 482 } |
| 481 | 483 |
| 482 void RenderWidgetHostViewChildFrame::UnlockMouse() { | 484 void RenderWidgetHostViewChildFrame::UnlockMouse() { |
| 483 } | 485 } |
| 484 | 486 |
| 487 bool RenderWidgetHostViewChildFrame::IsMouseLocked() { |
| 488 if (!frame_connector_) |
| 489 return false; |
| 490 |
| 491 RenderWidgetHostViewBase* root_view = |
| 492 frame_connector_->GetRootRenderWidgetHostView(); |
| 493 |
| 494 if (root_view) |
| 495 return root_view->IsMouseLocked(); |
| 496 |
| 497 return false; |
| 498 } |
| 499 |
| 485 uint32_t RenderWidgetHostViewChildFrame::GetSurfaceIdNamespace() { | 500 uint32_t RenderWidgetHostViewChildFrame::GetSurfaceIdNamespace() { |
| 486 return id_allocator_->id_namespace(); | 501 return id_allocator_->id_namespace(); |
| 487 } | 502 } |
| 488 | 503 |
| 489 void RenderWidgetHostViewChildFrame::ProcessKeyboardEvent( | 504 void RenderWidgetHostViewChildFrame::ProcessKeyboardEvent( |
| 490 const NativeWebKeyboardEvent& event) { | 505 const NativeWebKeyboardEvent& event) { |
| 491 host_->ForwardKeyboardEvent(event); | 506 host_->ForwardKeyboardEvent(event); |
| 492 } | 507 } |
| 493 | 508 |
| 494 void RenderWidgetHostViewChildFrame::ProcessMouseEvent( | 509 void RenderWidgetHostViewChildFrame::ProcessMouseEvent( |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 | 701 |
| 687 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { | 702 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { |
| 688 return true; | 703 return true; |
| 689 } | 704 } |
| 690 | 705 |
| 691 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 706 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
| 692 return surface_id_; | 707 return surface_id_; |
| 693 }; | 708 }; |
| 694 | 709 |
| 695 } // namespace content | 710 } // namespace content |
| OLD | NEW |