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

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

Issue 2821473002: Service CreateNewWindow on the UI thread with a new mojo interface (Closed)
Patch Set: MakeShared goodness Created 3 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_H_ 5 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_H_
6 #define CONTENT_TEST_TEST_RENDER_FRAME_H_ 6 #define CONTENT_TEST_TEST_RENDER_FRAME_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "content/common/frame.mojom.h"
9 #include "content/renderer/render_frame_impl.h" 12 #include "content/renderer/render_frame_impl.h"
13 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
10 14
11 namespace blink { 15 namespace blink {
12 class WebHistoryItem; 16 class WebHistoryItem;
13 } 17 }
14 18
15 namespace content { 19 namespace content {
16 20
17 struct CommonNavigationParams; 21 struct CommonNavigationParams;
22 class MockFrameHost;
18 struct RequestNavigationParams; 23 struct RequestNavigationParams;
19 struct StartNavigationParams; 24 struct StartNavigationParams;
20 25
21 // A test class to use in RenderViewTests. 26 // A test class to use in RenderViewTests.
22 class TestRenderFrame : public RenderFrameImpl { 27 class TestRenderFrame : public RenderFrameImpl {
23 public: 28 public:
24 static RenderFrameImpl* CreateTestRenderFrame( 29 static RenderFrameImpl* CreateTestRenderFrame(
25 const RenderFrameImpl::CreateParams& params); 30 const RenderFrameImpl::CreateParams& params);
26 ~TestRenderFrame() override; 31 ~TestRenderFrame() override;
27 32
(...skipping 14 matching lines...) Expand all
42 void CollapseSelection(); 47 void CollapseSelection();
43 void SetAccessibilityMode(AccessibilityMode new_mode); 48 void SetAccessibilityMode(AccessibilityMode new_mode);
44 void SetCompositionFromExistingText( 49 void SetCompositionFromExistingText(
45 int start, 50 int start,
46 int end, 51 int end,
47 const std::vector<blink::WebCompositionUnderline>& underlines); 52 const std::vector<blink::WebCompositionUnderline>& underlines);
48 53
49 blink::WebNavigationPolicy DecidePolicyForNavigation( 54 blink::WebNavigationPolicy DecidePolicyForNavigation(
50 const blink::WebFrameClient::NavigationPolicyInfo& info) override; 55 const blink::WebFrameClient::NavigationPolicyInfo& info) override;
51 56
57 mojom::FrameHostAssociatedPtr GetFrameHost() override;
58
52 private: 59 private:
60 void BindFrameHost(mojo::ScopedInterfaceEndpointHandle handle);
53 explicit TestRenderFrame(const RenderFrameImpl::CreateParams& params); 61 explicit TestRenderFrame(const RenderFrameImpl::CreateParams& params);
62
63 std::unique_ptr<MockFrameHost> mock_frame_host_;
64
54 DISALLOW_COPY_AND_ASSIGN(TestRenderFrame); 65 DISALLOW_COPY_AND_ASSIGN(TestRenderFrame);
55 }; 66 };
56 67
57 } // namespace content 68 } // namespace content
58 69
59 #endif // CONTENT_TEST_TEST_RENDER_FRAME_H_ 70 #endif // CONTENT_TEST_TEST_RENDER_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698