| 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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 void RenderWidgetHostViewChildFrame::ProcessAckedTouchEvent( | 471 void RenderWidgetHostViewChildFrame::ProcessAckedTouchEvent( |
| 472 const TouchEventWithLatencyInfo& touch, | 472 const TouchEventWithLatencyInfo& touch, |
| 473 InputEventAckState ack_result) { | 473 InputEventAckState ack_result) { |
| 474 if (!frame_connector_) | 474 if (!frame_connector_) |
| 475 return; | 475 return; |
| 476 | 476 |
| 477 frame_connector_->ForwardProcessAckedTouchEvent(touch, ack_result); | 477 frame_connector_->ForwardProcessAckedTouchEvent(touch, ack_result); |
| 478 } | 478 } |
| 479 | 479 |
| 480 bool RenderWidgetHostViewChildFrame::LockMouse() { | 480 bool RenderWidgetHostViewChildFrame::LockMouse() { |
| 481 if (frame_connector_) |
| 482 return frame_connector_->LockMouse(); |
| 481 return false; | 483 return false; |
| 482 } | 484 } |
| 483 | 485 |
| 484 void RenderWidgetHostViewChildFrame::UnlockMouse() { | 486 void RenderWidgetHostViewChildFrame::UnlockMouse() { |
| 485 } | 487 } |
| 486 | 488 |
| 489 bool RenderWidgetHostViewChildFrame::IsMouseLocked() { |
| 490 if (!frame_connector_) |
| 491 return false; |
| 492 |
| 493 RenderWidgetHostViewBase* root_view = |
| 494 frame_connector_->GetRootRenderWidgetHostView(); |
| 495 |
| 496 if (root_view) |
| 497 return root_view->IsMouseLocked(); |
| 498 |
| 499 return false; |
| 500 } |
| 501 |
| 487 uint32_t RenderWidgetHostViewChildFrame::GetSurfaceIdNamespace() { | 502 uint32_t RenderWidgetHostViewChildFrame::GetSurfaceIdNamespace() { |
| 488 return id_allocator_->id_namespace(); | 503 return id_allocator_->id_namespace(); |
| 489 } | 504 } |
| 490 | 505 |
| 491 void RenderWidgetHostViewChildFrame::ProcessKeyboardEvent( | 506 void RenderWidgetHostViewChildFrame::ProcessKeyboardEvent( |
| 492 const NativeWebKeyboardEvent& event) { | 507 const NativeWebKeyboardEvent& event) { |
| 493 host_->ForwardKeyboardEvent(event); | 508 host_->ForwardKeyboardEvent(event); |
| 494 } | 509 } |
| 495 | 510 |
| 496 void RenderWidgetHostViewChildFrame::ProcessMouseEvent( | 511 void RenderWidgetHostViewChildFrame::ProcessMouseEvent( |
| (...skipping 189 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 |