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

Side by Side Diff: content/app/content_main_runner.cc

Issue 1889423002: Move Windows DPI Code from ui/gfx to ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a TODO Created 4 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 unified diff | Download patch
OLDNEW
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/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #include "gin/v8_initializer.h" 72 #include "gin/v8_initializer.h"
73 #endif 73 #endif
74 74
75 #if defined(OS_WIN) 75 #if defined(OS_WIN)
76 #include <malloc.h> 76 #include <malloc.h>
77 #include <cstring> 77 #include <cstring>
78 78
79 #include "base/trace_event/trace_event_etw_export_win.h" 79 #include "base/trace_event/trace_event_etw_export_win.h"
80 #include "base/win/process_startup_helper.h" 80 #include "base/win/process_startup_helper.h"
81 #include "ui/base/win/atl_module.h" 81 #include "ui/base/win/atl_module.h"
82 #include "ui/gfx/win/dpi.h" 82 #include "ui/display/win/dpi.h"
83 #elif defined(OS_MACOSX) 83 #elif defined(OS_MACOSX)
84 #include "base/mac/scoped_nsautorelease_pool.h" 84 #include "base/mac/scoped_nsautorelease_pool.h"
85 #include "base/power_monitor/power_monitor_device_source.h" 85 #include "base/power_monitor/power_monitor_device_source.h"
86 #include "content/app/mac/mac_init.h" 86 #include "content/app/mac/mac_init.h"
87 #include "content/browser/mach_broker_mac.h" 87 #include "content/browser/mach_broker_mac.h"
88 #include "content/common/sandbox_init_mac.h" 88 #include "content/common/sandbox_init_mac.h"
89 #endif // OS_WIN 89 #endif // OS_WIN
90 90
91 #if defined(OS_POSIX) 91 #if defined(OS_POSIX)
92 #include <signal.h> 92 #include <signal.h>
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 525
526 // Initialize mojo here so that services can be registered. 526 // Initialize mojo here so that services can be registered.
527 InitializeMojo(); 527 InitializeMojo();
528 528
529 #if defined(OS_WIN) 529 #if defined(OS_WIN)
530 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) { 530 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) {
531 std::string scale_factor_string = command_line.GetSwitchValueASCII( 531 std::string scale_factor_string = command_line.GetSwitchValueASCII(
532 switches::kDeviceScaleFactor); 532 switches::kDeviceScaleFactor);
533 double scale_factor = 0; 533 double scale_factor = 0;
534 if (base::StringToDouble(scale_factor_string, &scale_factor)) 534 if (base::StringToDouble(scale_factor_string, &scale_factor))
535 gfx::SetDefaultDeviceScaleFactor(scale_factor); 535 display::win::SetDefaultDeviceScaleFactor(scale_factor);
536 } 536 }
537 #endif 537 #endif
538 538
539 if (!GetContentClient()) 539 if (!GetContentClient())
540 SetContentClient(&empty_content_client_); 540 SetContentClient(&empty_content_client_);
541 ContentClientInitializer::Set(process_type, delegate_); 541 ContentClientInitializer::Set(process_type, delegate_);
542 542
543 #if defined(OS_WIN) 543 #if defined(OS_WIN)
544 // Route stdio to parent console (if any) or create one. 544 // Route stdio to parent console (if any) or create one.
545 if (command_line.HasSwitch(switches::kEnableLogging)) 545 if (command_line.HasSwitch(switches::kEnableLogging))
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 798
799 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 799 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
800 }; 800 };
801 801
802 // static 802 // static
803 ContentMainRunner* ContentMainRunner::Create() { 803 ContentMainRunner* ContentMainRunner::Create() {
804 return new ContentMainRunnerImpl(); 804 return new ContentMainRunnerImpl();
805 } 805 }
806 806
807 } // namespace content 807 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/minimize_button_metrics_win.cc ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698