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 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_ITERATOR_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_ITERATOR_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_ITERATOR_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_ITERATOR_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "content/public/common/process_type.h" | 11 #include "content/public/common/process_type.h" |
12 | 12 |
13 class BrowserChildProcessHostImpl; | |
14 | |
15 namespace IPC { | 13 namespace IPC { |
16 class Message; | 14 class Message; |
17 } | 15 } |
18 | 16 |
19 namespace content { | 17 namespace content { |
20 | |
21 class BrowserChildProcessHostDelegate; | 18 class BrowserChildProcessHostDelegate; |
| 19 class BrowserChildProcessHostImpl; |
22 struct ChildProcessData; | 20 struct ChildProcessData; |
23 | 21 |
24 // This class allows iteration through either all child processes, or ones of a | 22 // This class allows iteration through either all child processes, or ones of a |
25 // specific type, depending on which constructor is used. Note that this should | 23 // specific type, depending on which constructor is used. Note that this should |
26 // be done from the IO thread and that the iterator should not be kept around as | 24 // be done from the IO thread and that the iterator should not be kept around as |
27 // it may be invalidated on subsequent event processing in the event loop. | 25 // it may be invalidated on subsequent event processing in the event loop. |
28 class CONTENT_EXPORT BrowserChildProcessHostIterator { | 26 class CONTENT_EXPORT BrowserChildProcessHostIterator { |
29 public: | 27 public: |
30 BrowserChildProcessHostIterator(); | 28 BrowserChildProcessHostIterator(); |
31 explicit BrowserChildProcessHostIterator(content::ProcessType type); | 29 explicit BrowserChildProcessHostIterator(content::ProcessType type); |
(...skipping 26 matching lines...) Expand all Loading... |
58 return static_cast<T*>(GetDelegate()); | 56 return static_cast<T*>(GetDelegate()); |
59 } | 57 } |
60 T* operator*() { | 58 T* operator*() { |
61 return static_cast<T*>(GetDelegate()); | 59 return static_cast<T*>(GetDelegate()); |
62 } | 60 } |
63 }; | 61 }; |
64 | 62 |
65 }; // namespace content | 63 }; // namespace content |
66 | 64 |
67 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_ITERATOR_H_ | 65 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_ITERATOR_H_ |
OLD | NEW |