| 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 void RenderWidgetHostViewChildFrame::ProcessAckedTouchEvent( | 470 void RenderWidgetHostViewChildFrame::ProcessAckedTouchEvent( |
| 471 const TouchEventWithLatencyInfo& touch, | 471 const TouchEventWithLatencyInfo& touch, |
| 472 InputEventAckState ack_result) { | 472 InputEventAckState ack_result) { |
| 473 if (!frame_connector_) | 473 if (!frame_connector_) |
| 474 return; | 474 return; |
| 475 | 475 |
| 476 frame_connector_->ForwardProcessAckedTouchEvent(touch, ack_result); | 476 frame_connector_->ForwardProcessAckedTouchEvent(touch, ack_result); |
| 477 } | 477 } |
| 478 | 478 |
| 479 bool RenderWidgetHostViewChildFrame::LockMouse() { | 479 bool RenderWidgetHostViewChildFrame::LockMouse() { |
| 480 if (frame_connector_) |
| 481 return frame_connector_->LockMouse(); |
| 480 return false; | 482 return false; |
| 481 } | 483 } |
| 482 | 484 |
| 483 void RenderWidgetHostViewChildFrame::UnlockMouse() { | 485 void RenderWidgetHostViewChildFrame::UnlockMouse() { |
| 484 } | 486 } |
| 485 | 487 |
| 488 bool RenderWidgetHostViewChildFrame::IsMouseLocked() { |
| 489 if (!frame_connector_) |
| 490 return false; |
| 491 |
| 492 RenderWidgetHostViewBase* root_view = |
| 493 frame_connector_->GetRootRenderWidgetHostView(); |
| 494 |
| 495 if (root_view) |
| 496 return root_view->IsMouseLocked(); |
| 497 |
| 498 return false; |
| 499 } |
| 500 |
| 486 uint32_t RenderWidgetHostViewChildFrame::GetSurfaceIdNamespace() { | 501 uint32_t RenderWidgetHostViewChildFrame::GetSurfaceIdNamespace() { |
| 487 return id_allocator_->id_namespace(); | 502 return id_allocator_->id_namespace(); |
| 488 } | 503 } |
| 489 | 504 |
| 490 void RenderWidgetHostViewChildFrame::ProcessKeyboardEvent( | 505 void RenderWidgetHostViewChildFrame::ProcessKeyboardEvent( |
| 491 const NativeWebKeyboardEvent& event) { | 506 const NativeWebKeyboardEvent& event) { |
| 492 host_->ForwardKeyboardEvent(event); | 507 host_->ForwardKeyboardEvent(event); |
| 493 } | 508 } |
| 494 | 509 |
| 495 void RenderWidgetHostViewChildFrame::ProcessMouseEvent( | 510 void RenderWidgetHostViewChildFrame::ProcessMouseEvent( |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 | 700 |
| 686 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { | 701 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { |
| 687 return true; | 702 return true; |
| 688 } | 703 } |
| 689 | 704 |
| 690 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 705 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
| 691 return surface_id_; | 706 return surface_id_; |
| 692 }; | 707 }; |
| 693 | 708 |
| 694 } // namespace content | 709 } // namespace content |
| OLD | NEW |