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 #include "content/public/test/test_navigation_observer.h" | 5 #include "content/public/test/test_navigation_observer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 // WebContentsObserver: | 27 // WebContentsObserver: |
28 virtual void NavigationEntryCommitted( | 28 virtual void NavigationEntryCommitted( |
29 const LoadCommittedDetails& load_details) OVERRIDE { | 29 const LoadCommittedDetails& load_details) OVERRIDE { |
30 parent_->OnNavigationEntryCommitted(this, web_contents(), load_details); | 30 parent_->OnNavigationEntryCommitted(this, web_contents(), load_details); |
31 } | 31 } |
32 | 32 |
33 virtual void DidAttachInterstitialPage() OVERRIDE { | 33 virtual void DidAttachInterstitialPage() OVERRIDE { |
34 parent_->OnDidAttachInterstitialPage(web_contents()); | 34 parent_->OnDidAttachInterstitialPage(web_contents()); |
35 } | 35 } |
36 | 36 |
37 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE { | 37 virtual void WebContentsDestroyed() OVERRIDE { |
38 parent_->OnWebContentsDestroyed(this, web_contents); | 38 parent_->OnWebContentsDestroyed(this, web_contents()); |
39 } | 39 } |
40 | 40 |
41 virtual void DidStartLoading(RenderViewHost* render_view_host) OVERRIDE { | 41 virtual void DidStartLoading(RenderViewHost* render_view_host) OVERRIDE { |
42 parent_->OnDidStartLoading(web_contents()); | 42 parent_->OnDidStartLoading(web_contents()); |
43 } | 43 } |
44 | 44 |
45 virtual void DidStopLoading(RenderViewHost* render_view_host) OVERRIDE { | 45 virtual void DidStopLoading(RenderViewHost* render_view_host) OVERRIDE { |
46 parent_->OnDidStopLoading(web_contents()); | 46 parent_->OnDidStopLoading(web_contents()); |
47 } | 47 } |
48 | 48 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 return; | 138 return; |
139 | 139 |
140 ++navigations_completed_; | 140 ++navigations_completed_; |
141 if (navigations_completed_ == number_of_navigations_) { | 141 if (navigations_completed_ == number_of_navigations_) { |
142 navigation_started_ = false; | 142 navigation_started_ = false; |
143 message_loop_runner_->Quit(); | 143 message_loop_runner_->Quit(); |
144 } | 144 } |
145 } | 145 } |
146 | 146 |
147 } // namespace content | 147 } // namespace content |
OLD | NEW |