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

Side by Side Diff: content/browser/resource_context.cc

Issue 9375024: Get IPC working for Indexed DB in shared workers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-add webframe check Created 8 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/resource_context.h" 5 #include "content/browser/resource_context.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/plugin_process_host.h" 8 #include "content/browser/plugin_process_host.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "webkit/database/database_tracker.h" 10 #include "webkit/database/database_tracker.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 ResourceContext::ResourceContext() 14 ResourceContext::ResourceContext()
15 : host_resolver_(NULL), 15 : host_resolver_(NULL),
16 request_context_(NULL), 16 request_context_(NULL),
17 appcache_service_(NULL), 17 appcache_service_(NULL),
18 database_tracker_(NULL), 18 database_tracker_(NULL),
19 file_system_context_(NULL), 19 file_system_context_(NULL),
20 blob_storage_context_(NULL), 20 blob_storage_context_(NULL),
21 quota_manager_(NULL), 21 quota_manager_(NULL),
22 host_zoom_map_(NULL), 22 host_zoom_map_(NULL),
23 media_observer_(NULL), 23 media_observer_(NULL),
24 media_stream_manager_(NULL), 24 media_stream_manager_(NULL),
25 audio_manager_(NULL) { 25 audio_manager_(NULL),
26 webkit_context_(NULL) {
26 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 27 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
27 } 28 }
28 29
29 ResourceContext::~ResourceContext() { 30 ResourceContext::~ResourceContext() {
30 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) { 31 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) {
31 // Band-aid for http://crbug.com/94704 until we change plug-in channel 32 // Band-aid for http://crbug.com/94704 until we change plug-in channel
32 // requests to be owned by the ResourceContext. 33 // requests to be owned by the ResourceContext.
33 PluginProcessHost::CancelPendingRequestsForResourceContext(this); 34 PluginProcessHost::CancelPendingRequestsForResourceContext(this);
34 } 35 }
35 } 36 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 EnsureInitialized(); 126 EnsureInitialized();
126 return quota_manager_; 127 return quota_manager_;
127 } 128 }
128 129
129 void ResourceContext::set_quota_manager( 130 void ResourceContext::set_quota_manager(
130 quota::QuotaManager* quota_manager) { 131 quota::QuotaManager* quota_manager) {
131 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 132 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
132 quota_manager_ = quota_manager; 133 quota_manager_ = quota_manager;
133 } 134 }
134 135
136 WebKitContext* ResourceContext::webkit_context() const {
137 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
138 EnsureInitialized();
139 return webkit_context_;
140 }
141
142 void ResourceContext::set_webkit_context(WebKitContext* webkit_context) {
143 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
144 webkit_context_ = webkit_context;
145 }
146
135 HostZoomMap* ResourceContext::host_zoom_map() const { 147 HostZoomMap* ResourceContext::host_zoom_map() const {
136 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 148 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
137 EnsureInitialized(); 149 EnsureInitialized();
138 return host_zoom_map_; 150 return host_zoom_map_;
139 } 151 }
140 152
141 void ResourceContext::set_host_zoom_map(HostZoomMap* host_zoom_map) { 153 void ResourceContext::set_host_zoom_map(HostZoomMap* host_zoom_map) {
142 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 154 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
143 host_zoom_map_ = host_zoom_map; 155 host_zoom_map_ = host_zoom_map;
144 } 156 }
(...skipping 27 matching lines...) Expand all
172 EnsureInitialized(); 184 EnsureInitialized();
173 return audio_manager_; 185 return audio_manager_;
174 } 186 }
175 187
176 void ResourceContext::set_audio_manager(AudioManager* audio_manager) { 188 void ResourceContext::set_audio_manager(AudioManager* audio_manager) {
177 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 189 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
178 audio_manager_ = audio_manager; 190 audio_manager_ = audio_manager;
179 } 191 }
180 192
181 } // namespace content 193 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698