| OLD | NEW |
| 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 #include "content/browser/renderer_host/render_view_host_factory.h" | 5 #include "content/browser/renderer_host/render_view_host_factory.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "content/browser/renderer_host/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 10 #include "content/browser/renderer_host/render_widget_host_impl.h" | 10 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 // static | 14 // static |
| 15 RenderViewHostFactory* RenderViewHostFactory::factory_ = nullptr; | 15 RenderViewHostFactory* RenderViewHostFactory::factory_ = nullptr; |
| 16 | 16 |
| 17 // static | 17 // static |
| 18 bool RenderViewHostFactory::is_real_render_view_host_ = false; |
| 19 |
| 20 // static |
| 18 RenderViewHost* RenderViewHostFactory::Create( | 21 RenderViewHost* RenderViewHostFactory::Create( |
| 19 SiteInstance* instance, | 22 SiteInstance* instance, |
| 20 RenderViewHostDelegate* delegate, | 23 RenderViewHostDelegate* delegate, |
| 21 RenderWidgetHostDelegate* widget_delegate, | 24 RenderWidgetHostDelegate* widget_delegate, |
| 22 int32_t routing_id, | 25 int32_t routing_id, |
| 23 int32_t main_frame_routing_id, | 26 int32_t main_frame_routing_id, |
| 24 bool swapped_out, | 27 bool swapped_out, |
| 25 bool hidden) { | 28 bool hidden) { |
| 26 // RenderViewHost creation can be either browser-driven (by the user opening a | 29 // RenderViewHost creation can be either browser-driven (by the user opening a |
| 27 // new tab) or renderer-driven (by script calling window.open, etc). | 30 // new tab) or renderer-driven (by script calling window.open, etc). |
| (...skipping 29 matching lines...) Expand all Loading... |
| 57 factory_ = factory; | 60 factory_ = factory; |
| 58 } | 61 } |
| 59 | 62 |
| 60 // static | 63 // static |
| 61 void RenderViewHostFactory::UnregisterFactory() { | 64 void RenderViewHostFactory::UnregisterFactory() { |
| 62 DCHECK(factory_) << "No factory to unregister."; | 65 DCHECK(factory_) << "No factory to unregister."; |
| 63 factory_ = nullptr; | 66 factory_ = nullptr; |
| 64 } | 67 } |
| 65 | 68 |
| 66 } // namespace content | 69 } // namespace content |
| OLD | NEW |