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_TEST_BROWSER_TEST_UTILS_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 class WebContentsDestroyedWatcher : public WebContentsObserver { | 216 class WebContentsDestroyedWatcher : public WebContentsObserver { |
217 public: | 217 public: |
218 explicit WebContentsDestroyedWatcher(WebContents* web_contents); | 218 explicit WebContentsDestroyedWatcher(WebContents* web_contents); |
219 virtual ~WebContentsDestroyedWatcher(); | 219 virtual ~WebContentsDestroyedWatcher(); |
220 | 220 |
221 // Waits until the WebContents is destroyed. | 221 // Waits until the WebContents is destroyed. |
222 void Wait(); | 222 void Wait(); |
223 | 223 |
224 private: | 224 private: |
225 // Overridden WebContentsObserver methods. | 225 // Overridden WebContentsObserver methods. |
226 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE; | 226 virtual void WebContentsDestroyed() OVERRIDE; |
227 | 227 |
228 scoped_refptr<MessageLoopRunner> message_loop_runner_; | 228 scoped_refptr<MessageLoopRunner> message_loop_runner_; |
229 | 229 |
230 DISALLOW_COPY_AND_ASSIGN(WebContentsDestroyedWatcher); | 230 DISALLOW_COPY_AND_ASSIGN(WebContentsDestroyedWatcher); |
231 }; | 231 }; |
232 | 232 |
233 // Watches a RenderProcessHost and waits for specified destruction events. | 233 // Watches a RenderProcessHost and waits for specified destruction events. |
234 class RenderProcessHostWatcher : public RenderProcessHostObserver { | 234 class RenderProcessHostWatcher : public RenderProcessHostObserver { |
235 public: | 235 public: |
236 enum WatchType { | 236 enum WatchType { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 NotificationRegistrar registrar_; | 289 NotificationRegistrar registrar_; |
290 std::queue<std::string> message_queue_; | 290 std::queue<std::string> message_queue_; |
291 scoped_refptr<MessageLoopRunner> message_loop_runner_; | 291 scoped_refptr<MessageLoopRunner> message_loop_runner_; |
292 | 292 |
293 DISALLOW_COPY_AND_ASSIGN(DOMMessageQueue); | 293 DISALLOW_COPY_AND_ASSIGN(DOMMessageQueue); |
294 }; | 294 }; |
295 | 295 |
296 } // namespace content | 296 } // namespace content |
297 | 297 |
298 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 298 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
OLD | NEW |