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

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

Issue 6532073: Move core pieces of browser\renderer_host to src\content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
(Empty)
1 // Copyright (c) 2009 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.
4
5 #include "chrome/browser/renderer_host/render_view_host_factory.h"
6
7 #include "base/logging.h"
8 #include "chrome/browser/renderer_host/render_view_host.h"
9
10 // static
11 RenderViewHostFactory* RenderViewHostFactory::factory_ = NULL;
12
13 // static
14 RenderViewHost* RenderViewHostFactory::Create(
15 SiteInstance* instance,
16 RenderViewHostDelegate* delegate,
17 int routing_id,
18 SessionStorageNamespace* session_storage_namespace) {
19 if (factory_) {
20 return factory_->CreateRenderViewHost(instance, delegate, routing_id,
21 session_storage_namespace);
22 }
23 return new RenderViewHost(instance, delegate, routing_id,
24 session_storage_namespace);
25 }
26
27 // static
28 void RenderViewHostFactory::RegisterFactory(RenderViewHostFactory* factory) {
29 DCHECK(!factory_) << "Can't register two factories at once.";
30 factory_ = factory;
31 }
32
33 // static
34 void RenderViewHostFactory::UnregisterFactory() {
35 DCHECK(factory_) << "No factory to unregister.";
36 factory_ = NULL;
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698