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 "chrome/renderer/chrome_render_process_observer.h" | 5 #include "chrome/renderer/chrome_render_process_observer.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/allocator/allocator_extension.h" | 10 #include "base/allocator/allocator_extension.h" |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 resource_delegate_.reset(new RendererResourceDelegate()); | 282 resource_delegate_.reset(new RendererResourceDelegate()); |
283 thread->SetResourceDispatcherDelegate(resource_delegate_.get()); | 283 thread->SetResourceDispatcherDelegate(resource_delegate_.get()); |
284 | 284 |
285 // Configure modules that need access to resources. | 285 // Configure modules that need access to resources. |
286 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 286 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
287 | 287 |
288 #if defined(OS_WIN) | 288 #if defined(OS_WIN) |
289 // Need to patch a few functions for font loading to work correctly. | 289 // Need to patch a few functions for font loading to work correctly. |
290 base::FilePath pdf; | 290 base::FilePath pdf; |
291 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && | 291 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && |
292 file_util::PathExists(pdf)) { | 292 base::PathExists(pdf)) { |
293 g_iat_patch_createdca.Patch( | 293 g_iat_patch_createdca.Patch( |
294 pdf.value().c_str(), "gdi32.dll", "CreateDCA", CreateDCAPatch); | 294 pdf.value().c_str(), "gdi32.dll", "CreateDCA", CreateDCAPatch); |
295 g_iat_patch_get_font_data.Patch( | 295 g_iat_patch_get_font_data.Patch( |
296 pdf.value().c_str(), "gdi32.dll", "GetFontData", GetFontDataPatch); | 296 pdf.value().c_str(), "gdi32.dll", "GetFontData", GetFontDataPatch); |
297 } | 297 } |
298 #endif | 298 #endif |
299 | 299 |
300 #if defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_NSS) | 300 #if defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_NSS) |
301 // On platforms where we use system NSS shared libraries, | 301 // On platforms where we use system NSS shared libraries, |
302 // initialize NSS now because it won't be able to load the .so's | 302 // initialize NSS now because it won't be able to load the .so's |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 if (clear_cache_pending_) { | 435 if (clear_cache_pending_) { |
436 clear_cache_pending_ = false; | 436 clear_cache_pending_ = false; |
437 WebCache::clear(); | 437 WebCache::clear(); |
438 } | 438 } |
439 } | 439 } |
440 | 440 |
441 const RendererContentSettingRules* | 441 const RendererContentSettingRules* |
442 ChromeRenderProcessObserver::content_setting_rules() const { | 442 ChromeRenderProcessObserver::content_setting_rules() const { |
443 return &content_setting_rules_; | 443 return &content_setting_rules_; |
444 } | 444 } |
OLD | NEW |