OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 return WrapUnique(new MessageLoop(type, pump_factory)); | 382 return WrapUnique(new MessageLoop(type, pump_factory)); |
383 } | 383 } |
384 | 384 |
385 MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory) | 385 MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory) |
386 : type_(type), | 386 : type_(type), |
387 #if defined(OS_WIN) | 387 #if defined(OS_WIN) |
388 pending_high_res_tasks_(0), | 388 pending_high_res_tasks_(0), |
389 in_high_res_mode_(false), | 389 in_high_res_mode_(false), |
390 #endif | 390 #endif |
391 nestable_tasks_allowed_(true), | 391 nestable_tasks_allowed_(true), |
392 #if defined(OS_WIN) | |
393 os_modal_loop_(false), | |
394 #endif // OS_WIN | |
395 pump_factory_(pump_factory), | 392 pump_factory_(pump_factory), |
396 message_histogram_(NULL), | 393 message_histogram_(NULL), |
397 run_loop_(NULL), | 394 run_loop_(NULL), |
398 incoming_task_queue_(new internal::IncomingTaskQueue(this)), | 395 incoming_task_queue_(new internal::IncomingTaskQueue(this)), |
399 unbound_task_runner_( | 396 unbound_task_runner_( |
400 new internal::MessageLoopTaskRunner(incoming_task_queue_)), | 397 new internal::MessageLoopTaskRunner(incoming_task_queue_)), |
401 task_runner_(unbound_task_runner_) { | 398 task_runner_(unbound_task_runner_) { |
402 // If type is TYPE_CUSTOM non-null pump_factory must be given. | 399 // If type is TYPE_CUSTOM non-null pump_factory must be given. |
403 DCHECK(type_ != TYPE_CUSTOM || !pump_factory_.is_null()); | 400 DCHECK(type_ != TYPE_CUSTOM || !pump_factory_.is_null()); |
404 } | 401 } |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 persistent, | 740 persistent, |
744 mode, | 741 mode, |
745 controller, | 742 controller, |
746 delegate); | 743 delegate); |
747 } | 744 } |
748 #endif | 745 #endif |
749 | 746 |
750 #endif // !defined(OS_NACL_SFI) | 747 #endif // !defined(OS_NACL_SFI) |
751 | 748 |
752 } // namespace base | 749 } // namespace base |
OLD | NEW |