| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 screen_info_ = emulator->original_screen_info(); | 427 screen_info_ = emulator->original_screen_info(); |
| 428 device_scale_factor_ = screen_info_.deviceScaleFactor; | 428 device_scale_factor_ = screen_info_.deviceScaleFactor; |
| 429 } | 429 } |
| 430 | 430 |
| 431 gfx::Rect RenderWidget::AdjustValidationMessageAnchor(const gfx::Rect& anchor) { | 431 gfx::Rect RenderWidget::AdjustValidationMessageAnchor(const gfx::Rect& anchor) { |
| 432 if (screen_metrics_emulator_) | 432 if (screen_metrics_emulator_) |
| 433 return screen_metrics_emulator_->AdjustValidationMessageAnchor(anchor); | 433 return screen_metrics_emulator_->AdjustValidationMessageAnchor(anchor); |
| 434 return anchor; | 434 return anchor; |
| 435 } | 435 } |
| 436 | 436 |
| 437 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 437 #if defined(USE_EXTERNAL_POPUP_MENU) |
| 438 void RenderWidget::SetExternalPopupOriginAdjustmentsForEmulation( | 438 void RenderWidget::SetExternalPopupOriginAdjustmentsForEmulation( |
| 439 ExternalPopupMenu* popup, | 439 ExternalPopupMenu* popup, |
| 440 RenderWidgetScreenMetricsEmulator* emulator) { | 440 RenderWidgetScreenMetricsEmulator* emulator) { |
| 441 popup->SetOriginScaleAndOffsetForEmulation( | 441 popup->SetOriginScaleAndOffsetForEmulation( |
| 442 emulator->scale(), emulator->offset()); | 442 emulator->scale(), emulator->offset()); |
| 443 } | 443 } |
| 444 #endif | 444 #endif |
| 445 | 445 |
| 446 void RenderWidget::OnShowHostContextMenu(ContextMenuParams* params) { | 446 void RenderWidget::OnShowHostContextMenu(ContextMenuParams* params) { |
| 447 if (screen_metrics_emulator_) | 447 if (screen_metrics_emulator_) |
| (...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2090 } | 2090 } |
| 2091 | 2091 |
| 2092 float RenderWidget::GetOriginalDeviceScaleFactor() const { | 2092 float RenderWidget::GetOriginalDeviceScaleFactor() const { |
| 2093 return | 2093 return |
| 2094 screen_metrics_emulator_ ? | 2094 screen_metrics_emulator_ ? |
| 2095 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : | 2095 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : |
| 2096 device_scale_factor_; | 2096 device_scale_factor_; |
| 2097 } | 2097 } |
| 2098 | 2098 |
| 2099 } // namespace content | 2099 } // namespace content |
| OLD | NEW |