| 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 const blink::WebTouchEvent& event, | 401 const blink::WebTouchEvent& event, |
| 402 const ui::LatencyInfo& latency) { | 402 const ui::LatencyInfo& latency) { |
| 403 if (event.type == blink::WebInputEvent::TouchStart && | 403 if (event.type == blink::WebInputEvent::TouchStart && |
| 404 frame_connector_ && !frame_connector_->HasFocus()) { | 404 frame_connector_ && !frame_connector_->HasFocus()) { |
| 405 frame_connector_->FocusRootView(); | 405 frame_connector_->FocusRootView(); |
| 406 } | 406 } |
| 407 | 407 |
| 408 host_->ForwardTouchEventWithLatencyInfo(event, latency); | 408 host_->ForwardTouchEventWithLatencyInfo(event, latency); |
| 409 } | 409 } |
| 410 | 410 |
| 411 void RenderWidgetHostViewChildFrame::ProcessGestureEvent( |
| 412 const blink::WebGestureEvent& event, |
| 413 const ui::LatencyInfo& latency) { |
| 414 host_->ForwardGestureEventWithLatencyInfo(event, latency); |
| 415 } |
| 416 |
| 411 gfx::Point RenderWidgetHostViewChildFrame::TransformPointToRootCoordSpace( | 417 gfx::Point RenderWidgetHostViewChildFrame::TransformPointToRootCoordSpace( |
| 412 const gfx::Point& point) { | 418 const gfx::Point& point) { |
| 413 if (!frame_connector_) | 419 if (!frame_connector_) |
| 414 return point; | 420 return point; |
| 415 | 421 |
| 416 return frame_connector_->TransformPointToRootCoordSpace(point, surface_id_); | 422 return frame_connector_->TransformPointToRootCoordSpace(point, surface_id_); |
| 417 } | 423 } |
| 418 | 424 |
| 419 #if defined(OS_MACOSX) | 425 #if defined(OS_MACOSX) |
| 420 void RenderWidgetHostViewChildFrame::SetActive(bool active) { | 426 void RenderWidgetHostViewChildFrame::SetActive(bool active) { |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 if (surface_factory_ && !surface_id_.is_null()) | 559 if (surface_factory_ && !surface_id_.is_null()) |
| 554 surface_factory_->Destroy(surface_id_); | 560 surface_factory_->Destroy(surface_id_); |
| 555 surface_id_ = cc::SurfaceId(); | 561 surface_id_ = cc::SurfaceId(); |
| 556 } | 562 } |
| 557 | 563 |
| 558 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 564 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
| 559 return surface_id_; | 565 return surface_id_; |
| 560 }; | 566 }; |
| 561 | 567 |
| 562 } // namespace content | 568 } // namespace content |
| OLD | NEW |