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

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

Issue 545054: Introduce all the plumbing for Session Storage. This mostly consists of crea... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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) 2009 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/renderer_host/render_view_host_factory.h" 5 #include "chrome/browser/renderer_host/render_view_host_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/renderer_host/render_view_host.h" 8 #include "chrome/browser/renderer_host/render_view_host.h"
9 9
10 // static 10 // static
11 RenderViewHostFactory* RenderViewHostFactory::factory_ = NULL; 11 RenderViewHostFactory* RenderViewHostFactory::factory_ = NULL;
12 12
13 // static 13 // static
14 RenderViewHost* RenderViewHostFactory::Create( 14 RenderViewHost* RenderViewHostFactory::Create(
15 SiteInstance* instance, 15 SiteInstance* instance,
16 RenderViewHostDelegate* delegate, 16 RenderViewHostDelegate* delegate,
17 int routing_id) { 17 int routing_id,
18 int64 session_storage_namespace_id) {
18 if (factory_) { 19 if (factory_) {
19 return factory_->CreateRenderViewHost(instance, delegate, routing_id); 20 return factory_->CreateRenderViewHost(instance, delegate, routing_id,
21 session_storage_namespace_id);
20 } 22 }
21 return new RenderViewHost(instance, delegate, routing_id); 23 return new RenderViewHost(instance, delegate, routing_id,
24 session_storage_namespace_id);
22 } 25 }
23 26
24 // static 27 // static
25 void RenderViewHostFactory::RegisterFactory(RenderViewHostFactory* factory) { 28 void RenderViewHostFactory::RegisterFactory(RenderViewHostFactory* factory) {
26 DCHECK(!factory_) << "Can't register two factories at once."; 29 DCHECK(!factory_) << "Can't register two factories at once.";
27 factory_ = factory; 30 factory_ = factory;
28 } 31 }
29 32
30 // static 33 // static
31 void RenderViewHostFactory::UnregisterFactory() { 34 void RenderViewHostFactory::UnregisterFactory() {
32 DCHECK(factory_) << "No factory to unregister."; 35 DCHECK(factory_) << "No factory to unregister.";
33 factory_ = NULL; 36 factory_ = NULL;
34 } 37 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host_factory.h ('k') | chrome/browser/renderer_host/resource_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698