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

Side by Side Diff: content/browser/renderer_host/render_view_host_factory.cc

Issue 23129015: Initialize RenderWidget(Host)(View)s with correct visibility state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
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 #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 "content/browser/renderer_host/render_view_host_impl.h" 8 #include "content/browser/renderer_host/render_view_host_impl.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 // static 12 // static
13 RenderViewHostFactory* RenderViewHostFactory::factory_ = NULL; 13 RenderViewHostFactory* RenderViewHostFactory::factory_ = NULL;
14 14
15 // static 15 // static
16 RenderViewHost* RenderViewHostFactory::Create( 16 RenderViewHost* RenderViewHostFactory::Create(
17 SiteInstance* instance, 17 SiteInstance* instance,
18 RenderViewHostDelegate* delegate, 18 RenderViewHostDelegate* delegate,
19 RenderWidgetHostDelegate* widget_delegate, 19 RenderWidgetHostDelegate* widget_delegate,
20 int routing_id, 20 int routing_id,
21 int main_frame_routing_id, 21 int main_frame_routing_id,
22 bool swapped_out) { 22 bool swapped_out,
23 bool hidden) {
23 if (factory_) { 24 if (factory_) {
24 return factory_->CreateRenderViewHost(instance, delegate, widget_delegate, 25 return factory_->CreateRenderViewHost(instance, delegate, widget_delegate,
25 routing_id, main_frame_routing_id, 26 routing_id, main_frame_routing_id,
26 swapped_out); 27 swapped_out);
27 } 28 }
28 return new RenderViewHostImpl(instance, delegate, widget_delegate, routing_id, 29 return new RenderViewHostImpl(instance, delegate, widget_delegate, routing_id,
29 main_frame_routing_id, swapped_out); 30 main_frame_routing_id, swapped_out, hidden);
30 } 31 }
31 32
32 // static 33 // static
33 void RenderViewHostFactory::RegisterFactory(RenderViewHostFactory* factory) { 34 void RenderViewHostFactory::RegisterFactory(RenderViewHostFactory* factory) {
34 DCHECK(!factory_) << "Can't register two factories at once."; 35 DCHECK(!factory_) << "Can't register two factories at once.";
35 factory_ = factory; 36 factory_ = factory;
36 } 37 }
37 38
38 // static 39 // static
39 void RenderViewHostFactory::UnregisterFactory() { 40 void RenderViewHostFactory::UnregisterFactory() {
40 DCHECK(factory_) << "No factory to unregister."; 41 DCHECK(factory_) << "No factory to unregister.";
41 factory_ = NULL; 42 factory_ = NULL;
42 } 43 }
43 44
44 } // namespace content 45 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_factory.h ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698