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_child_process_host.h" | 5 #include "content/browser/browser_child_process_host.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "base/synchronization/waitable_event.h" | 28 #include "base/synchronization/waitable_event.h" |
29 #else | 29 #else |
30 #include "base/bind.h" | 30 #include "base/bind.h" |
31 #endif | 31 #endif |
32 | 32 |
33 using content::BrowserThread; | 33 using content::BrowserThread; |
34 | 34 |
35 namespace { | 35 namespace { |
36 | 36 |
37 typedef std::list<BrowserChildProcessHost*> ChildProcessList; | 37 typedef std::list<BrowserChildProcessHost*> ChildProcessList; |
38 static base::LazyInstance<ChildProcessList> g_child_process_list( | 38 static base::LazyInstance<ChildProcessList> g_child_process_list = |
39 base::LINKER_INITIALIZED); | 39 LAZY_INSTANCE_INITIALIZER; |
40 | 40 |
41 // The NotificationTask is used to notify about plugin process connection/ | 41 // The NotificationTask is used to notify about plugin process connection/ |
42 // disconnection. It is needed because the notifications in the | 42 // disconnection. It is needed because the notifications in the |
43 // NotificationService must happen in the main thread. | 43 // NotificationService must happen in the main thread. |
44 class ChildNotificationTask : public Task { | 44 class ChildNotificationTask : public Task { |
45 public: | 45 public: |
46 ChildNotificationTask( | 46 ChildNotificationTask( |
47 int notification_type, ChildProcessInfo* info) | 47 int notification_type, ChildProcessInfo* info) |
48 : notification_type_(notification_type), info_(*info) { } | 48 : notification_type_(notification_type), info_(*info) { } |
49 | 49 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 275 |
276 return *iterator_; | 276 return *iterator_; |
277 } while (true); | 277 } while (true); |
278 | 278 |
279 return NULL; | 279 return NULL; |
280 } | 280 } |
281 | 281 |
282 bool BrowserChildProcessHost::Iterator::Done() { | 282 bool BrowserChildProcessHost::Iterator::Done() { |
283 return iterator_ == g_child_process_list.Get().end(); | 283 return iterator_ == g_child_process_list.Get().end(); |
284 } | 284 } |
OLD | NEW |