| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 FROM_HERE, base::Bind(&RenderWidget::DoDeferredClose, this)); | 1430 FROM_HERE, base::Bind(&RenderWidget::DoDeferredClose, this)); |
| 1431 } | 1431 } |
| 1432 | 1432 |
| 1433 void RenderWidget::QueueSyntheticGesture( | 1433 void RenderWidget::QueueSyntheticGesture( |
| 1434 scoped_ptr<SyntheticGestureParams> gesture_params, | 1434 scoped_ptr<SyntheticGestureParams> gesture_params, |
| 1435 const SyntheticGestureCompletionCallback& callback) { | 1435 const SyntheticGestureCompletionCallback& callback) { |
| 1436 DCHECK(!callback.is_null()); | 1436 DCHECK(!callback.is_null()); |
| 1437 | 1437 |
| 1438 pending_synthetic_gesture_callbacks_.push(callback); | 1438 pending_synthetic_gesture_callbacks_.push(callback); |
| 1439 | 1439 |
| 1440 QueueSyntheticGesture(std::move(gesture_params)); |
| 1441 } |
| 1442 |
| 1443 void RenderWidget::QueueSyntheticGesture( |
| 1444 scoped_ptr<SyntheticGestureParams> gesture_params) { |
| 1440 SyntheticGesturePacket gesture_packet; | 1445 SyntheticGesturePacket gesture_packet; |
| 1441 gesture_packet.set_gesture_params(std::move(gesture_params)); | 1446 gesture_packet.set_gesture_params(std::move(gesture_params)); |
| 1442 | 1447 LOG(ERROR) << "RenderWidget::QueueSyntheticGesture "; |
| 1443 Send(new InputHostMsg_QueueSyntheticGesture(routing_id_, gesture_packet)); | 1448 Send(new InputHostMsg_QueueSyntheticGesture(routing_id_, gesture_packet)); |
| 1444 } | 1449 } |
| 1445 | 1450 |
| 1446 void RenderWidget::Close() { | 1451 void RenderWidget::Close() { |
| 1447 screen_metrics_emulator_.reset(); | 1452 screen_metrics_emulator_.reset(); |
| 1448 WillCloseLayerTreeView(); | 1453 WillCloseLayerTreeView(); |
| 1449 compositor_.reset(); | 1454 compositor_.reset(); |
| 1450 if (webwidget_) { | 1455 if (webwidget_) { |
| 1451 webwidget_->close(); | 1456 webwidget_->close(); |
| 1452 webwidget_ = NULL; | 1457 webwidget_ = NULL; |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2181 } | 2186 } |
| 2182 | 2187 |
| 2183 float RenderWidget::GetOriginalDeviceScaleFactor() const { | 2188 float RenderWidget::GetOriginalDeviceScaleFactor() const { |
| 2184 return | 2189 return |
| 2185 screen_metrics_emulator_ ? | 2190 screen_metrics_emulator_ ? |
| 2186 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : | 2191 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : |
| 2187 device_scale_factor_; | 2192 device_scale_factor_; |
| 2188 } | 2193 } |
| 2189 | 2194 |
| 2190 } // namespace content | 2195 } // namespace content |
| OLD | NEW |