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/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 #if defined(OS_MACOSX) && !defined(OS_IOS) | 76 #if defined(OS_MACOSX) && !defined(OS_IOS) |
77 #include "content/browser/theme_helper_mac.h" | 77 #include "content/browser/theme_helper_mac.h" |
78 #endif | 78 #endif |
79 | 79 |
80 #if defined(OS_WIN) | 80 #if defined(OS_WIN) |
81 #include <windows.h> | 81 #include <windows.h> |
82 #include <commctrl.h> | 82 #include <commctrl.h> |
83 #include <shellapi.h> | 83 #include <shellapi.h> |
84 | 84 |
85 #include "content/browser/system_message_window_win.h" | 85 #include "content/browser/system_message_window_win.h" |
| 86 #include "content/browser/time_zone_monitor_win.h" |
86 #include "content/common/sandbox_win.h" | 87 #include "content/common/sandbox_win.h" |
87 #include "net/base/winsock_init.h" | 88 #include "net/base/winsock_init.h" |
88 #include "ui/base/l10n/l10n_util_win.h" | 89 #include "ui/base/l10n/l10n_util_win.h" |
89 #endif | 90 #endif |
90 | 91 |
91 #if defined(USE_GLIB) | 92 #if defined(USE_GLIB) |
92 #include <glib-object.h> | 93 #include <glib-object.h> |
93 #endif | 94 #endif |
94 | 95 |
95 #if defined(OS_LINUX) && defined(USE_UDEV) | 96 #if defined(OS_LINUX) && defined(USE_UDEV) |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 } | 491 } |
491 | 492 |
492 { | 493 { |
493 system_stats_monitor_.reset(new base::debug::TraceEventSystemStatsMonitor( | 494 system_stats_monitor_.reset(new base::debug::TraceEventSystemStatsMonitor( |
494 base::ThreadTaskRunnerHandle::Get())); | 495 base::ThreadTaskRunnerHandle::Get())); |
495 } | 496 } |
496 #endif // !defined(OS_IOS) | 497 #endif // !defined(OS_IOS) |
497 | 498 |
498 #if defined(OS_WIN) | 499 #if defined(OS_WIN) |
499 system_message_window_.reset(new SystemMessageWindowWin); | 500 system_message_window_.reset(new SystemMessageWindowWin); |
| 501 time_zone_monitor_win_.reset(new TimeZoneMonitorWin); |
500 #endif | 502 #endif |
501 | 503 |
502 if (parts_) | 504 if (parts_) |
503 parts_->PostMainMessageLoopStart(); | 505 parts_->PostMainMessageLoopStart(); |
504 | 506 |
505 #if !defined(OS_IOS) | 507 #if !defined(OS_IOS) |
506 // Start tracing to a file if needed. Only do this after starting the main | 508 // Start tracing to a file if needed. Only do this after starting the main |
507 // message loop to avoid calling MessagePumpForUI::ScheduleWork() before | 509 // message loop to avoid calling MessagePumpForUI::ScheduleWork() before |
508 // MessagePumpForUI::Start() as it will crash the browser. | 510 // MessagePumpForUI::Start() as it will crash the browser. |
509 if (is_tracing_startup_) { | 511 if (is_tracing_startup_) { |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 base::TimeDelta::FromSeconds(delay_secs)); | 1129 base::TimeDelta::FromSeconds(delay_secs)); |
1128 } | 1130 } |
1129 | 1131 |
1130 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { | 1132 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { |
1131 is_tracing_startup_ = false; | 1133 is_tracing_startup_ = false; |
1132 TracingController::GetInstance()->DisableRecording( | 1134 TracingController::GetInstance()->DisableRecording( |
1133 trace_file, TracingController::TracingFileResultCallback()); | 1135 trace_file, TracingController::TracingFileResultCallback()); |
1134 } | 1136 } |
1135 | 1137 |
1136 } // namespace content | 1138 } // namespace content |
OLD | NEW |