OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "net/base/ssl_config_service.h" | 26 #include "net/base/ssl_config_service.h" |
27 #include "net/socket/client_socket_factory.h" | 27 #include "net/socket/client_socket_factory.h" |
28 #include "net/socket/tcp_client_socket.h" | 28 #include "net/socket/tcp_client_socket.h" |
29 | 29 |
30 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
31 #include <windows.h> | 31 #include <windows.h> |
32 #include <commctrl.h> | 32 #include <commctrl.h> |
33 #include <ole2.h> | 33 #include <ole2.h> |
34 #include <shellapi.h> | 34 #include <shellapi.h> |
35 | 35 |
| 36 #include "content/browser/system_message_window_win.h" |
36 #include "ui/base/l10n/l10n_util_win.h" | 37 #include "ui/base/l10n/l10n_util_win.h" |
37 #include "net/base/winsock_init.h" | 38 #include "net/base/winsock_init.h" |
38 #endif | 39 #endif |
39 | 40 |
40 #if defined(OS_LINUX) | 41 #if defined(OS_LINUX) |
41 #include <glib-object.h> | 42 #include <glib-object.h> |
42 #endif | 43 #endif |
43 | 44 |
44 #if defined(OS_CHROMEOS) | 45 #if defined(OS_CHROMEOS) |
45 #include <dbus/dbus-glib.h> | 46 #include <dbus/dbus-glib.h> |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 250 |
250 // Start tracing to a file if needed. | 251 // Start tracing to a file if needed. |
251 if (base::debug::TraceLog::GetInstance()->IsEnabled()) | 252 if (base::debug::TraceLog::GetInstance()->IsEnabled()) |
252 TraceController::GetInstance()->InitStartupTracing(parsed_command_line_); | 253 TraceController::GetInstance()->InitStartupTracing(parsed_command_line_); |
253 | 254 |
254 system_monitor_.reset(new base::SystemMonitor); | 255 system_monitor_.reset(new base::SystemMonitor); |
255 hi_res_timer_manager_.reset(new HighResolutionTimerManager); | 256 hi_res_timer_manager_.reset(new HighResolutionTimerManager); |
256 | 257 |
257 network_change_notifier_.reset(net::NetworkChangeNotifier::Create()); | 258 network_change_notifier_.reset(net::NetworkChangeNotifier::Create()); |
258 | 259 |
| 260 #if defined(OS_WIN) |
| 261 system_message_window_.reset(new SystemMessageWindowWin); |
| 262 #endif |
| 263 |
259 for (size_t i = 0; i < parts_list_.size(); ++i) | 264 for (size_t i = 0; i < parts_list_.size(); ++i) |
260 parts_list_[i]->PostMainMessageLoopStart(); | 265 parts_list_[i]->PostMainMessageLoopStart(); |
261 } | 266 } |
262 | 267 |
263 void BrowserMainLoop::RunMainMessageLoopParts( | 268 void BrowserMainLoop::RunMainMessageLoopParts( |
264 bool* completed_main_message_loop) { | 269 bool* completed_main_message_loop) { |
265 for (size_t i = 0; i < parts_list_.size(); ++i) | 270 for (size_t i = 0; i < parts_list_.size(); ++i) |
266 parts_list_[i]->PreMainMessageLoopRun(); | 271 parts_list_[i]->PreMainMessageLoopRun(); |
267 | 272 |
268 TRACE_EVENT_BEGIN_ETW("BrowserMain:MESSAGE_LOOP", 0, ""); | 273 TRACE_EVENT_BEGIN_ETW("BrowserMain:MESSAGE_LOOP", 0, ""); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 MessageLoopForUI::current()->PostTask(FROM_HERE, parameters_.ui_task); | 354 MessageLoopForUI::current()->PostTask(FROM_HERE, parameters_.ui_task); |
350 | 355 |
351 #if defined(OS_MACOSX) | 356 #if defined(OS_MACOSX) |
352 MessageLoopForUI::current()->Run(); | 357 MessageLoopForUI::current()->Run(); |
353 #else | 358 #else |
354 MessageLoopForUI::current()->RunWithDispatcher(NULL); | 359 MessageLoopForUI::current()->RunWithDispatcher(NULL); |
355 #endif | 360 #endif |
356 } | 361 } |
357 | 362 |
358 } // namespace content | 363 } // namespace content |
OLD | NEW |