| 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 const blink::WebTouchEvent& event, | 419 const blink::WebTouchEvent& event, |
| 420 const ui::LatencyInfo& latency) { | 420 const ui::LatencyInfo& latency) { |
| 421 if (event.type == blink::WebInputEvent::TouchStart && | 421 if (event.type == blink::WebInputEvent::TouchStart && |
| 422 frame_connector_ && !frame_connector_->HasFocus()) { | 422 frame_connector_ && !frame_connector_->HasFocus()) { |
| 423 frame_connector_->FocusRootView(); | 423 frame_connector_->FocusRootView(); |
| 424 } | 424 } |
| 425 | 425 |
| 426 host_->ForwardTouchEventWithLatencyInfo(event, latency); | 426 host_->ForwardTouchEventWithLatencyInfo(event, latency); |
| 427 } | 427 } |
| 428 | 428 |
| 429 void RenderWidgetHostViewChildFrame::ProcessGestureEvent( |
| 430 const blink::WebGestureEvent& event, |
| 431 const ui::LatencyInfo& latency) { |
| 432 host_->ForwardGestureEventWithLatencyInfo(event, latency); |
| 433 } |
| 434 |
| 429 gfx::Point RenderWidgetHostViewChildFrame::TransformPointToRootCoordSpace( | 435 gfx::Point RenderWidgetHostViewChildFrame::TransformPointToRootCoordSpace( |
| 430 const gfx::Point& point) { | 436 const gfx::Point& point) { |
| 431 if (!frame_connector_) | 437 if (!frame_connector_) |
| 432 return point; | 438 return point; |
| 433 | 439 |
| 434 return frame_connector_->TransformPointToRootCoordSpace(point, surface_id_); | 440 return frame_connector_->TransformPointToRootCoordSpace(point, surface_id_); |
| 435 } | 441 } |
| 436 | 442 |
| 437 #if defined(OS_MACOSX) | 443 #if defined(OS_MACOSX) |
| 438 void RenderWidgetHostViewChildFrame::SetActive(bool active) { | 444 void RenderWidgetHostViewChildFrame::SetActive(bool active) { |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 if (surface_factory_ && !surface_id_.is_null()) | 577 if (surface_factory_ && !surface_id_.is_null()) |
| 572 surface_factory_->Destroy(surface_id_); | 578 surface_factory_->Destroy(surface_id_); |
| 573 surface_id_ = cc::SurfaceId(); | 579 surface_id_ = cc::SurfaceId(); |
| 574 } | 580 } |
| 575 | 581 |
| 576 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 582 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
| 577 return surface_id_; | 583 return surface_id_; |
| 578 }; | 584 }; |
| 579 | 585 |
| 580 } // namespace content | 586 } // namespace content |
| OLD | NEW |