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

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

Issue 10255020: Get the default device scale factor from monitor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated comment Created 8 years, 8 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
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index f094a62268dfcc1b56886024f83390209b69104f..6850ebd13809f70a7a33f34ca13f2c8b5e943611 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -6,7 +6,6 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
-#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/weak_ptr.h"
#include "base/string_number_conversions.h"
@@ -18,7 +17,6 @@
#include "content/common/gpu/gpu_messages.h"
#include "content/port/browser/render_widget_host_view_port.h"
#include "content/public/browser/browser_thread.h"
-#include "content/public/common/content_switches.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
@@ -126,19 +124,10 @@ void GetScreenInfoForWindow(WebKit::WebScreenInfo* results,
const gfx::Size size = monitor.size();
results->rect = WebKit::WebRect(0, 0, size.width(), size.height());
results->availableRect = results->rect;
- // TODO(derat): Don't hardcode this?
+ // TODO(derat|oshima): Don't hardcode this. Get this from monitor object.
results->depth = 24;
results->depthPerComponent = 8;
int default_dpi = monitor.device_scale_factor() * 160;
- // TODO(fsamuel): This is a temporary hack until Monitor code is complete.
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- if (command_line.HasSwitch(switches::kDefaultDeviceScaleFactor)) {
- int default_device_scale_factor;
- base::StringToInt(command_line.GetSwitchValueASCII(
- switches::kDefaultDeviceScaleFactor),
- &default_device_scale_factor);
- default_dpi = default_device_scale_factor * 160;
- }
results->verticalDPI = default_dpi;
results->horizontalDPI = default_dpi;
}
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698