Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1099)

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2688413007: Add display::GetDisplayNearestView (Closed)
Patch Set: add missing files Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index d5f2a617cc7ced2cc2b1211b1c57645ab9db3e88..57bbea7b6b7982924e24de3791c9febe4c6cb6a5 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1423,8 +1423,7 @@ void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
WasResized();
if (touch_emulator_) {
tapted 2017/02/15 00:36:10 nit: curlies not needed
Jinsuk Kim 2017/02/16 10:11:25 Done.
- touch_emulator_->SetDeviceScaleFactor(
- view_.get() ? content::GetScaleFactorForView(view_.get()) : 1.0f);
+ touch_emulator_->SetDeviceScaleFactor(GetScaleFactorForView(view_.get()));
}
}
@@ -1959,9 +1958,8 @@ void RenderWidgetHostImpl::SetTouchEventEmulationEnabled(
bool enabled, ui::GestureProviderConfigType config_type) {
if (enabled) {
if (!touch_emulator_) {
- touch_emulator_.reset(new TouchEmulator(
- this,
- view_.get() ? content::GetScaleFactorForView(view_.get()) : 1.0f));
+ touch_emulator_.reset(
tapted 2017/02/15 00:36:10 touch_emulator_ = base::MakeUnique<TouchEmulator>(
Jinsuk Kim 2017/02/16 10:11:24 Done.
+ new TouchEmulator(this, GetScaleFactorForView(view_.get())));
}
touch_emulator_->Enable(config_type);
} else {

Powered by Google App Engine
This is Rietveld 408576698