| 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_TEST_NAVIGATION_OBSERVER_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_TEST_NAVIGATION_OBSERVER_H_ |
| 6 #define CONTENT_PUBLIC_TEST_TEST_NAVIGATION_OBSERVER_H_ | 6 #define CONTENT_PUBLIC_TEST_TEST_NAVIGATION_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 void OnWebContentsDestroyed(TestWebContentsObserver* observer, | 49 void OnWebContentsDestroyed(TestWebContentsObserver* observer, |
| 50 WebContents* web_contents); | 50 WebContents* web_contents); |
| 51 void OnNavigationEntryCommitted( | 51 void OnNavigationEntryCommitted( |
| 52 TestWebContentsObserver* observer, | 52 TestWebContentsObserver* observer, |
| 53 WebContents* web_contents, | 53 WebContents* web_contents, |
| 54 const LoadCommittedDetails& load_details); | 54 const LoadCommittedDetails& load_details); |
| 55 void OnDidAttachInterstitialPage(WebContents* web_contents); | 55 void OnDidAttachInterstitialPage(WebContents* web_contents); |
| 56 void OnDidStartLoading(WebContents* web_contents); | 56 void OnDidStartLoading(WebContents* web_contents); |
| 57 void OnDidStopLoading(WebContents* web_contents); | 57 void OnDidStopLoading(WebContents* web_contents); |
| 58 | 58 |
| 59 WebContents* web_contents_; |
| 60 |
| 59 // If true the navigation has started. | 61 // If true the navigation has started. |
| 60 bool navigation_started_; | 62 bool navigation_started_; |
| 61 | 63 |
| 62 // The number of navigations that have been completed. | 64 // The number of navigations that have been completed. |
| 63 int navigations_completed_; | 65 int navigations_completed_; |
| 64 | 66 |
| 65 // The number of navigations to wait for. | 67 // The number of navigations to wait for. |
| 66 int number_of_navigations_; | 68 int number_of_navigations_; |
| 67 | 69 |
| 68 // The MessageLoopRunner used to spin the message loop. | 70 // The MessageLoopRunner used to spin the message loop. |
| 69 scoped_refptr<MessageLoopRunner> message_loop_runner_; | 71 scoped_refptr<MessageLoopRunner> message_loop_runner_; |
| 70 | 72 |
| 71 // Callback invoked on WebContents creation. | 73 // Callback invoked on WebContents creation. |
| 72 base::Callback<void(WebContents*)> web_contents_created_callback_; | 74 base::Callback<void(WebContents*)> web_contents_created_callback_; |
| 73 | 75 |
| 74 // Living TestWebContentsObservers created by this observer. | 76 // Living TestWebContentsObservers created by this observer. |
| 75 std::set<TestWebContentsObserver*> web_contents_observers_; | 77 std::set<TestWebContentsObserver*> web_contents_observers_; |
| 76 | 78 |
| 77 DISALLOW_COPY_AND_ASSIGN(TestNavigationObserver); | 79 DISALLOW_COPY_AND_ASSIGN(TestNavigationObserver); |
| 78 }; | 80 }; |
| 79 | 81 |
| 80 } // namespace content | 82 } // namespace content |
| 81 | 83 |
| 82 #endif // CONTENT_PUBLIC_TEST_TEST_NAVIGATION_OBSERVER_H_ | 84 #endif // CONTENT_PUBLIC_TEST_TEST_NAVIGATION_OBSERVER_H_ |
| OLD | NEW |