OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_ | 5 #ifndef CONTENT_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_ |
6 #define CONTENT_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_ | 6 #define CONTENT_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // Runs a nested message loop and blocks until the expected number of | 37 // Runs a nested message loop and blocks until the expected number of |
38 // navigations are complete. | 38 // navigations are complete. |
39 void Wait(); | 39 void Wait(); |
40 | 40 |
41 private: | 41 private: |
42 // WebContentsObserver | 42 // WebContentsObserver |
43 virtual void DidStartProvisionalLoadForFrame( | 43 virtual void DidStartProvisionalLoadForFrame( |
44 RenderFrameHost* render_frame_host, | 44 RenderFrameHost* render_frame_host, |
45 const GURL& validated_url, | 45 const GURL& validated_url, |
46 bool is_error_page, | 46 bool is_error_page, |
47 bool is_iframe_srcdoc) OVERRIDE; | 47 bool is_iframe_srcdoc) override; |
48 virtual void DidNavigateAnyFrame( | 48 virtual void DidNavigateAnyFrame( |
49 const LoadCommittedDetails& details, | 49 const LoadCommittedDetails& details, |
50 const FrameNavigateParams& params) OVERRIDE; | 50 const FrameNavigateParams& params) override; |
51 | 51 |
52 // The id of the FrameTreeNode in which navigations are peformed. | 52 // The id of the FrameTreeNode in which navigations are peformed. |
53 int frame_tree_node_id_; | 53 int frame_tree_node_id_; |
54 | 54 |
55 // If true the navigation has started. | 55 // If true the navigation has started. |
56 bool navigation_started_; | 56 bool navigation_started_; |
57 | 57 |
58 // The number of navigations that have been completed. | 58 // The number of navigations that have been completed. |
59 int navigations_completed_; | 59 int navigations_completed_; |
60 | 60 |
61 // The number of navigations to wait for. | 61 // The number of navigations to wait for. |
62 int number_of_navigations_; | 62 int number_of_navigations_; |
63 | 63 |
64 // The MessageLoopRunner used to spin the message loop. | 64 // The MessageLoopRunner used to spin the message loop. |
65 scoped_refptr<MessageLoopRunner> message_loop_runner_; | 65 scoped_refptr<MessageLoopRunner> message_loop_runner_; |
66 | 66 |
67 DISALLOW_COPY_AND_ASSIGN(TestFrameNavigationObserver); | 67 DISALLOW_COPY_AND_ASSIGN(TestFrameNavigationObserver); |
68 }; | 68 }; |
69 | 69 |
70 } // namespace content | 70 } // namespace content |
71 | 71 |
72 #endif // CONTENT_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_ | 72 #endif // CONTENT_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_ |
OLD | NEW |