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

Side by Side Diff: content/test/test_render_frame_host.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_RENDER_FRAME_HOST_H_ 5 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ 6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "content/browser/frame_host/render_frame_host_impl.h" 11 #include "content/browser/frame_host/render_frame_host_impl.h"
12 #include "content/public/browser/web_contents_observer.h" 12 #include "content/public/browser/web_contents_observer.h"
13 #include "content/public/test/test_renderer_host.h" 13 #include "content/public/test/test_renderer_host.h"
14 #include "content/test/test_render_view_host.h" 14 #include "content/test/test_render_view_host.h"
15 #include "ui/base/page_transition_types.h" 15 #include "ui/base/page_transition_types.h"
16 16
17 struct FrameHostMsg_DidCommitProvisionalLoad_Params; 17 struct FrameHostMsg_DidCommitProvisionalLoad_Params;
18 18
19 namespace content { 19 namespace content {
20 20
21 class TestRenderFrameHostCreationObserver : public WebContentsObserver { 21 class TestRenderFrameHostCreationObserver : public WebContentsObserver {
22 public: 22 public:
23 explicit TestRenderFrameHostCreationObserver(WebContents* web_contents); 23 explicit TestRenderFrameHostCreationObserver(WebContents* web_contents);
24 virtual ~TestRenderFrameHostCreationObserver(); 24 ~TestRenderFrameHostCreationObserver() override;
25 25
26 // WebContentsObserver implementation. 26 // WebContentsObserver implementation.
27 virtual void RenderFrameCreated(RenderFrameHost* render_frame_host) override; 27 void RenderFrameCreated(RenderFrameHost* render_frame_host) override;
28 28
29 RenderFrameHost* last_created_frame() const { return last_created_frame_; } 29 RenderFrameHost* last_created_frame() const { return last_created_frame_; }
30 30
31 private: 31 private:
32 RenderFrameHost* last_created_frame_; 32 RenderFrameHost* last_created_frame_;
33 }; 33 };
34 34
35 class TestRenderFrameHost : public RenderFrameHostImpl, 35 class TestRenderFrameHost : public RenderFrameHostImpl,
36 public RenderFrameHostTester { 36 public RenderFrameHostTester {
37 public: 37 public:
38 TestRenderFrameHost(RenderViewHostImpl* render_view_host, 38 TestRenderFrameHost(RenderViewHostImpl* render_view_host,
39 RenderFrameHostDelegate* delegate, 39 RenderFrameHostDelegate* delegate,
40 FrameTree* frame_tree, 40 FrameTree* frame_tree,
41 FrameTreeNode* frame_tree_node, 41 FrameTreeNode* frame_tree_node,
42 int routing_id, 42 int routing_id,
43 bool is_swapped_out); 43 bool is_swapped_out);
44 virtual ~TestRenderFrameHost(); 44 ~TestRenderFrameHost() override;
45 45
46 // RenderFrameHostImpl overrides (same values, but in Test* types) 46 // RenderFrameHostImpl overrides (same values, but in Test* types)
47 virtual TestRenderViewHost* GetRenderViewHost() override; 47 TestRenderViewHost* GetRenderViewHost() override;
48 48
49 // RenderFrameHostTester implementation. 49 // RenderFrameHostTester implementation.
50 virtual TestRenderFrameHost* AppendChild( 50 TestRenderFrameHost* AppendChild(const std::string& frame_name) override;
51 const std::string& frame_name) override; 51 void SendNavigate(int page_id, const GURL& url) override;
52 virtual void SendNavigate(int page_id, const GURL& url) override; 52 void SendFailedNavigate(int page_id, const GURL& url) override;
53 virtual void SendFailedNavigate(int page_id, const GURL& url) override; 53 void SendNavigateWithTransition(int page_id,
54 virtual void SendNavigateWithTransition( 54 const GURL& url,
55 int page_id, 55 ui::PageTransition transition) override;
56 const GURL& url, 56 void SetContentsMimeType(const std::string& mime_type) override;
57 ui::PageTransition transition) override; 57 void SendBeforeUnloadACK(bool proceed) override;
58 virtual void SetContentsMimeType(const std::string& mime_type) override; 58 void SimulateSwapOutACK() override;
59 virtual void SendBeforeUnloadACK(bool proceed) override;
60 virtual void SimulateSwapOutACK() override;
61 59
62 void SendNavigateWithTransitionAndResponseCode( 60 void SendNavigateWithTransitionAndResponseCode(
63 int page_id, 61 int page_id,
64 const GURL& url, ui::PageTransition transition, 62 const GURL& url, ui::PageTransition transition,
65 int response_code); 63 int response_code);
66 void SendNavigateWithOriginalRequestURL( 64 void SendNavigateWithOriginalRequestURL(
67 int page_id, 65 int page_id,
68 const GURL& url, 66 const GURL& url,
69 const GURL& original_request_url); 67 const GURL& original_request_url);
70 void SendNavigateWithFile( 68 void SendNavigateWithFile(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 102
105 // See set_simulate_history_list_was_cleared() above. 103 // See set_simulate_history_list_was_cleared() above.
106 bool simulate_history_list_was_cleared_; 104 bool simulate_history_list_was_cleared_;
107 105
108 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); 106 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost);
109 }; 107 };
110 108
111 } // namespace content 109 } // namespace content
112 110
113 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ 111 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
OLDNEW
« no previous file with comments | « content/test/test_media_stream_renderer_factory.h ('k') | content/test/test_render_frame_host_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698