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