Get foreground tab on Android
[chromium-blink-merge.git] / content / test / test_render_frame_host_factory.cc
blobc308aed3cf078188729bc33dfd8e8941b27f4442
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
3 // found in the LICENSE file.
5 #include "content/test/test_render_frame_host_factory.h"
7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h"
9 #include "base/logging.h"
10 #include "content/browser/frame_host/test_render_frame_host.h"
12 namespace content {
14 TestRenderFrameHostFactory::TestRenderFrameHostFactory() {
15 RenderFrameHostFactory::RegisterFactory(this);
18 TestRenderFrameHostFactory::~TestRenderFrameHostFactory() {
19 RenderFrameHostFactory::UnregisterFactory();
22 scoped_ptr<RenderFrameHostImpl>
23 TestRenderFrameHostFactory::CreateRenderFrameHost(
24 RenderViewHostImpl* render_view_host,
25 FrameTree* frame_tree,
26 int routing_id,
27 bool is_swapped_out) {
28 return make_scoped_ptr(
29 new TestRenderFrameHost(
30 render_view_host, frame_tree, routing_id, is_swapped_out))
31 .PassAs<RenderFrameHostImpl>();
34 } // namespace content