Index: content/browser/android/content_view_core_impl.cc |
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc |
index ffee1ca221feca941fe093dcac10b1f90eb13666..e879158191a08d858220b1dbf1aefd597e4821ed 100644 |
--- a/content/browser/android/content_view_core_impl.cc |
+++ b/content/browser/android/content_view_core_impl.cc |
@@ -27,7 +27,6 @@ |
#include "content/browser/web_contents/navigation_controller_impl.h" |
#include "content/browser/web_contents/navigation_entry_impl.h" |
#include "content/browser/web_contents/web_contents_view_android.h" |
-#include "content/common/android/device_info.h" |
#include "content/common/view_messages.h" |
#include "content/public/browser/browser_context.h" |
#include "content/public/browser/favicon_status.h" |
@@ -171,8 +170,9 @@ ContentViewCoreImpl::ContentViewCoreImpl(JNIEnv* env, jobject obj, |
if (!gfx::Screen::GetNativeScreen()->IsDIPEnabled()) { |
dpi_scale_ = 1; |
} else { |
- scoped_ptr<content::DeviceInfo> device_info(new content::DeviceInfo()); |
- dpi_scale_ = device_info->GetDPIScale(); |
+ const gfx::Display& display = |
+ gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); |
+ dpi_scale_ = display.device_scale_factor(); |
} |
// Currently, the only use case we have for overriding a user agent involves |