Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(718)

Side by Side Diff: content/test/test_frame_navigation_observer.h

Issue 671663002: Standardize usage of virtual/override/final in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/test/test_content_client.h ('k') | content/test/test_media_stream_renderer_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 // MessageLoop and quit when the navigation in a specific frame completes 25 // MessageLoop and quit when the navigation in a specific frame completes
26 // loading. 26 // loading.
27 class TestFrameNavigationObserver : public WebContentsObserver { 27 class TestFrameNavigationObserver : public WebContentsObserver {
28 public: 28 public:
29 // Create and register a new TestFrameNavigationObserver which will track 29 // Create and register a new TestFrameNavigationObserver which will track
30 // navigations performed in the specified |node| of the frame tree. 30 // navigations performed in the specified |node| of the frame tree.
31 TestFrameNavigationObserver(FrameTreeNode* node, int number_of_navigations); 31 TestFrameNavigationObserver(FrameTreeNode* node, int number_of_navigations);
32 // As above but waits for one navigation. 32 // As above but waits for one navigation.
33 explicit TestFrameNavigationObserver(FrameTreeNode* node); 33 explicit TestFrameNavigationObserver(FrameTreeNode* node);
34 34
35 virtual ~TestFrameNavigationObserver(); 35 ~TestFrameNavigationObserver() override;
36 36
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 void DidStartProvisionalLoadForFrame(RenderFrameHost* render_frame_host,
44 RenderFrameHost* render_frame_host, 44 const GURL& validated_url,
45 const GURL& validated_url, 45 bool is_error_page,
46 bool is_error_page, 46 bool is_iframe_srcdoc) override;
47 bool is_iframe_srcdoc) override; 47 void DidNavigateAnyFrame(RenderFrameHost* render_frame_host,
48 virtual void DidNavigateAnyFrame( 48 const LoadCommittedDetails& details,
49 RenderFrameHost* render_frame_host, 49 const FrameNavigateParams& params) override;
50 const LoadCommittedDetails& details,
51 const FrameNavigateParams& params) override;
52 50
53 // The id of the FrameTreeNode in which navigations are peformed. 51 // The id of the FrameTreeNode in which navigations are peformed.
54 int frame_tree_node_id_; 52 int frame_tree_node_id_;
55 53
56 // If true the navigation has started. 54 // If true the navigation has started.
57 bool navigation_started_; 55 bool navigation_started_;
58 56
59 // The number of navigations that have been completed. 57 // The number of navigations that have been completed.
60 int navigations_completed_; 58 int navigations_completed_;
61 59
62 // The number of navigations to wait for. 60 // The number of navigations to wait for.
63 int number_of_navigations_; 61 int number_of_navigations_;
64 62
65 // The MessageLoopRunner used to spin the message loop. 63 // The MessageLoopRunner used to spin the message loop.
66 scoped_refptr<MessageLoopRunner> message_loop_runner_; 64 scoped_refptr<MessageLoopRunner> message_loop_runner_;
67 65
68 DISALLOW_COPY_AND_ASSIGN(TestFrameNavigationObserver); 66 DISALLOW_COPY_AND_ASSIGN(TestFrameNavigationObserver);
69 }; 67 };
70 68
71 } // namespace content 69 } // namespace content
72 70
73 #endif // CONTENT_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_ 71 #endif // CONTENT_TEST_TEST_FRAME_NAVIGATION_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/test/test_content_client.h ('k') | content/test/test_media_stream_renderer_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698