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

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

Issue 1874903002: Convert //content from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 (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_TEST_TEST_RENDER_VIEW_HOST_H_ 5 #ifndef CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_
6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ 6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 void WasOccluded() override; 81 void WasOccluded() override;
82 gfx::Rect GetViewBounds() const override; 82 gfx::Rect GetViewBounds() const override;
83 #if defined(OS_MACOSX) 83 #if defined(OS_MACOSX)
84 void SetActive(bool active) override; 84 void SetActive(bool active) override;
85 void ShowDefinitionForSelection() override {} 85 void ShowDefinitionForSelection() override {}
86 bool SupportsSpeech() const override; 86 bool SupportsSpeech() const override;
87 void SpeakSelection() override; 87 void SpeakSelection() override;
88 bool IsSpeaking() const override; 88 bool IsSpeaking() const override;
89 void StopSpeaking() override; 89 void StopSpeaking() override;
90 #endif // defined(OS_MACOSX) 90 #endif // defined(OS_MACOSX)
91 void OnSwapCompositorFrame(uint32_t output_surface_id, 91 void OnSwapCompositorFrame(
92 scoped_ptr<cc::CompositorFrame> frame) override; 92 uint32_t output_surface_id,
93 std::unique_ptr<cc::CompositorFrame> frame) override;
93 void ClearCompositorFrame() override {} 94 void ClearCompositorFrame() override {}
94 95
95 // RenderWidgetHostViewBase implementation. 96 // RenderWidgetHostViewBase implementation.
96 void InitAsPopup(RenderWidgetHostView* parent_host_view, 97 void InitAsPopup(RenderWidgetHostView* parent_host_view,
97 const gfx::Rect& bounds) override {} 98 const gfx::Rect& bounds) override {}
98 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override {} 99 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override {}
99 void Focus() override {} 100 void Focus() override {}
100 void SetIsLoading(bool is_loading) override {} 101 void SetIsLoading(bool is_loading) override {}
101 void UpdateCursor(const WebCursor& cursor) override {} 102 void UpdateCursor(const WebCursor& cursor) override {}
102 void UpdateInputMethodIfNecessary(bool text_input_state_changed) override {} 103 void UpdateInputMethodIfNecessary(bool text_input_state_changed) override {}
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // 183 //
183 // The reason we do it this way instead of using composition is 184 // The reason we do it this way instead of using composition is
184 // similar to (b) above, essentially it gets very tricky. By using 185 // similar to (b) above, essentially it gets very tricky. By using
185 // the split interface we avoid complexity within content and maintain 186 // the split interface we avoid complexity within content and maintain
186 // reasonable utility for embedders. 187 // reasonable utility for embedders.
187 class TestRenderViewHost 188 class TestRenderViewHost
188 : public RenderViewHostImpl, 189 : public RenderViewHostImpl,
189 public RenderViewHostTester { 190 public RenderViewHostTester {
190 public: 191 public:
191 TestRenderViewHost(SiteInstance* instance, 192 TestRenderViewHost(SiteInstance* instance,
192 scoped_ptr<RenderWidgetHostImpl> widget, 193 std::unique_ptr<RenderWidgetHostImpl> widget,
193 RenderViewHostDelegate* delegate, 194 RenderViewHostDelegate* delegate,
194 int32_t main_frame_routing_id, 195 int32_t main_frame_routing_id,
195 bool swapped_out); 196 bool swapped_out);
196 ~TestRenderViewHost() override; 197 ~TestRenderViewHost() override;
197 198
198 // RenderViewHostTester implementation. Note that CreateRenderView 199 // RenderViewHostTester implementation. Note that CreateRenderView
199 // is not specified since it is synonymous with the one from 200 // is not specified since it is synonymous with the one from
200 // RenderViewHostImpl, see below. 201 // RenderViewHostImpl, see below.
201 void SimulateWasHidden() override; 202 void SimulateWasHidden() override;
202 void SimulateWasShown() override; 203 void SimulateWasShown() override;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 // contents()->GetPendingRenderViewHost() ? 298 // contents()->GetPendingRenderViewHost() ?
298 // contents()->GetPendingRenderViewHost() : 299 // contents()->GetPendingRenderViewHost() :
299 // contents()->GetRenderViewHost(); 300 // contents()->GetRenderViewHost();
300 TestRenderViewHost* active_test_rvh(); 301 TestRenderViewHost* active_test_rvh();
301 302
302 // main_test_rfh() is equivalent to contents()->GetMainFrame() 303 // main_test_rfh() is equivalent to contents()->GetMainFrame()
303 // TODO(nick): Replace all uses with contents()->GetMainFrame() 304 // TODO(nick): Replace all uses with contents()->GetMainFrame()
304 TestRenderFrameHost* main_test_rfh(); 305 TestRenderFrameHost* main_test_rfh();
305 306
306 private: 307 private:
307 typedef scoped_ptr<ui::test::ScopedSetSupportedScaleFactors> 308 typedef std::unique_ptr<ui::test::ScopedSetSupportedScaleFactors>
308 ScopedSetSupportedScaleFactors; 309 ScopedSetSupportedScaleFactors;
309 ScopedSetSupportedScaleFactors scoped_set_supported_scale_factors_; 310 ScopedSetSupportedScaleFactors scoped_set_supported_scale_factors_;
310 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness); 311 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness);
311 }; 312 };
312 313
313 } // namespace content 314 } // namespace content
314 315
315 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ 316 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698