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/public/app/content_main_runner.h" | 5 #include "content/public/app/content_main_runner.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/debugger.h" | 9 #include "base/debug/debugger.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "content/public/common/content_paths.h" | 26 #include "content/public/common/content_paths.h" |
27 #include "content/public/common/content_switches.h" | 27 #include "content/public/common/content_switches.h" |
28 #include "content/public/common/main_function_params.h" | 28 #include "content/public/common/main_function_params.h" |
29 #include "content/public/common/sandbox_init.h" | 29 #include "content/public/common/sandbox_init.h" |
30 #include "crypto/nss_util.h" | 30 #include "crypto/nss_util.h" |
31 #include "ipc/ipc_switches.h" | 31 #include "ipc/ipc_switches.h" |
32 #include "media/base/media.h" | 32 #include "media/base/media.h" |
33 #include "sandbox/src/sandbox_types.h" | 33 #include "sandbox/src/sandbox_types.h" |
34 #include "ui/base/ui_base_switches.h" | 34 #include "ui/base/ui_base_switches.h" |
35 #include "ui/base/ui_base_paths.h" | 35 #include "ui/base/ui_base_paths.h" |
| 36 #include "ui/base/win/dpi.h" |
36 #include "webkit/glue/webkit_glue.h" | 37 #include "webkit/glue/webkit_glue.h" |
37 | 38 |
38 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
39 #include <atlbase.h> | 40 #include <atlbase.h> |
40 #include <atlapp.h> | 41 #include <atlapp.h> |
41 #include <malloc.h> | 42 #include <malloc.h> |
42 #elif defined(OS_MACOSX) | 43 #elif defined(OS_MACOSX) |
43 #include "base/mac/scoped_nsautorelease_pool.h" | 44 #include "base/mac/scoped_nsautorelease_pool.h" |
44 #include "base/mach_ipc_mac.h" | 45 #include "base/mach_ipc_mac.h" |
45 #include "base/system_monitor/system_monitor.h" | 46 #include "base/system_monitor/system_monitor.h" |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 (delegate && | 411 (delegate && |
411 delegate->ProcessRegistersWithSystemProcess(process_type))) { | 412 delegate->ProcessRegistersWithSystemProcess(process_type))) { |
412 base::SystemMonitor::AllocateSystemIOPorts(); | 413 base::SystemMonitor::AllocateSystemIOPorts(); |
413 } | 414 } |
414 | 415 |
415 if (!process_type.empty() && | 416 if (!process_type.empty() && |
416 (!delegate || delegate->ShouldSendMachPort(process_type))) { | 417 (!delegate || delegate->ShouldSendMachPort(process_type))) { |
417 SendTaskPortToParentProcess(); | 418 SendTaskPortToParentProcess(); |
418 } | 419 } |
419 #elif defined(OS_WIN) | 420 #elif defined(OS_WIN) |
| 421 #if defined(ENABLE_HIDPI) |
| 422 ui::EnableHighDPISupport(); |
| 423 #endif |
420 content::SetupCRT(command_line); | 424 content::SetupCRT(command_line); |
421 #endif | 425 #endif |
422 | 426 |
423 #if defined(OS_POSIX) | 427 #if defined(OS_POSIX) |
424 if (!process_type.empty()) { | 428 if (!process_type.empty()) { |
425 // When you hit Ctrl-C in a terminal running the browser | 429 // When you hit Ctrl-C in a terminal running the browser |
426 // process, a SIGINT is delivered to the entire process group. | 430 // process, a SIGINT is delivered to the entire process group. |
427 // When debugging the browser process via gdb, gdb catches the | 431 // When debugging the browser process via gdb, gdb catches the |
428 // SIGINT for the browser process (and dumps you back to the gdb | 432 // SIGINT for the browser process (and dumps you back to the gdb |
429 // console) but doesn't for the child processes, killing them. | 433 // console) but doesn't for the child processes, killing them. |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 } // namespace | 580 } // namespace |
577 | 581 |
578 namespace content { | 582 namespace content { |
579 | 583 |
580 // static | 584 // static |
581 ContentMainRunner* ContentMainRunner::Create() { | 585 ContentMainRunner* ContentMainRunner::Create() { |
582 return new ContentMainRunnerImpl(); | 586 return new ContentMainRunnerImpl(); |
583 } | 587 } |
584 | 588 |
585 } // namespace content | 589 } // namespace content |
OLD | NEW |