| OLD | NEW |
| 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 #include "content/browser/frame_host/render_frame_host_factory.h" | 5 #include "content/browser/frame_host/render_frame_host_factory.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/browser/frame_host/frame_tree_node.h" | 8 #include "content/browser/frame_host/frame_tree_node.h" |
| 9 #include "content/browser/frame_host/render_frame_host_impl.h" | 9 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 // static | 13 // static |
| 14 RenderFrameHostFactory* RenderFrameHostFactory::factory_ = NULL; | 14 RenderFrameHostFactory* RenderFrameHostFactory::factory_ = NULL; |
| 15 | 15 |
| 16 // static | 16 // static |
| 17 scoped_ptr<RenderFrameHostImpl> RenderFrameHostFactory::Create( | 17 scoped_ptr<RenderFrameHostImpl> RenderFrameHostFactory::Create( |
| 18 SiteInstance* site_instance, | 18 SiteInstanceImpl* site_instance, |
| 19 RenderViewHostImpl* render_view_host, | 19 RenderViewHostImpl* render_view_host, |
| 20 RenderFrameHostDelegate* delegate, | 20 RenderFrameHostDelegate* delegate, |
| 21 RenderWidgetHostDelegate* rwh_delegate, | 21 RenderWidgetHostDelegate* rwh_delegate, |
| 22 FrameTree* frame_tree, | 22 FrameTree* frame_tree, |
| 23 FrameTreeNode* frame_tree_node, | 23 FrameTreeNode* frame_tree_node, |
| 24 int32_t routing_id, | 24 int32_t routing_id, |
| 25 int32_t widget_routing_id, | 25 int32_t widget_routing_id, |
| 26 bool hidden) { | 26 bool hidden) { |
| 27 if (factory_) { | 27 if (factory_) { |
| 28 return factory_->CreateRenderFrameHost( | 28 return factory_->CreateRenderFrameHost( |
| (...skipping 11 matching lines...) Expand all Loading... |
| 40 factory_ = factory; | 40 factory_ = factory; |
| 41 } | 41 } |
| 42 | 42 |
| 43 // static | 43 // static |
| 44 void RenderFrameHostFactory::UnregisterFactory() { | 44 void RenderFrameHostFactory::UnregisterFactory() { |
| 45 DCHECK(factory_) << "No factory to unregister."; | 45 DCHECK(factory_) << "No factory to unregister."; |
| 46 factory_ = NULL; | 46 factory_ = NULL; |
| 47 } | 47 } |
| 48 | 48 |
| 49 } // namespace content | 49 } // namespace content |
| OLD | NEW |