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 "content/ppapi_plugin/ppapi_thread.h" | 5 #include "content/ppapi_plugin/ppapi_thread.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/cpu.h" | 10 #include "base/cpu.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "ppapi/proxy/plugin_globals.h" | 44 #include "ppapi/proxy/plugin_globals.h" |
45 #include "ppapi/proxy/plugin_message_filter.h" | 45 #include "ppapi/proxy/plugin_message_filter.h" |
46 #include "ppapi/proxy/ppapi_messages.h" | 46 #include "ppapi/proxy/ppapi_messages.h" |
47 #include "ppapi/proxy/resource_reply_thread_registrar.h" | 47 #include "ppapi/proxy/resource_reply_thread_registrar.h" |
48 #include "third_party/WebKit/public/web/WebKit.h" | 48 #include "third_party/WebKit/public/web/WebKit.h" |
49 #include "ui/base/ui_base_switches.h" | 49 #include "ui/base/ui_base_switches.h" |
50 | 50 |
51 #if defined(OS_WIN) | 51 #if defined(OS_WIN) |
52 #include "base/win/win_util.h" | 52 #include "base/win/win_util.h" |
53 #include "base/win/windows_version.h" | 53 #include "base/win/windows_version.h" |
| 54 #include "content/common/font_warmup_win.h" |
54 #include "sandbox/win/src/sandbox.h" | 55 #include "sandbox/win/src/sandbox.h" |
55 #elif defined(OS_MACOSX) | 56 #elif defined(OS_MACOSX) |
56 #include "content/common/sandbox_init_mac.h" | 57 #include "content/common/sandbox_init_mac.h" |
57 #endif | 58 #endif |
58 | 59 |
59 #if defined(OS_WIN) | 60 #if defined(OS_WIN) |
60 const char kWidevineCdmAdapterFileName[] = "widevinecdmadapter.dll"; | 61 const char kWidevineCdmAdapterFileName[] = "widevinecdmadapter.dll"; |
61 | 62 |
62 extern sandbox::TargetServices* g_target_services; | 63 extern sandbox::TargetServices* g_target_services; |
63 | 64 |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 } | 398 } |
398 } | 399 } |
399 } | 400 } |
400 | 401 |
401 // Cause advapi32 to load before the sandbox is turned on. | 402 // Cause advapi32 to load before the sandbox is turned on. |
402 unsigned int dummy_rand; | 403 unsigned int dummy_rand; |
403 rand_s(&dummy_rand); | 404 rand_s(&dummy_rand); |
404 | 405 |
405 WarmupWindowsLocales(permissions); | 406 WarmupWindowsLocales(permissions); |
406 | 407 |
| 408 if (!base::win::IsUser32AndGdi32Available() && |
| 409 permissions.HasPermission(ppapi::PERMISSION_FLASH)) { |
| 410 PatchGdiFontEnumeration(path); |
| 411 } |
| 412 |
407 g_target_services->LowerToken(); | 413 g_target_services->LowerToken(); |
408 } | 414 } |
409 #endif | 415 #endif |
410 | 416 |
411 if (is_broker_) { | 417 if (is_broker_) { |
412 // Get the InitializeBroker function (required). | 418 // Get the InitializeBroker function (required). |
413 InitializeBrokerFunc init_broker = | 419 InitializeBrokerFunc init_broker = |
414 reinterpret_cast<InitializeBrokerFunc>( | 420 reinterpret_cast<InitializeBrokerFunc>( |
415 library.GetFunctionPointer("PPP_InitializeBroker")); | 421 library.GetFunctionPointer("PPP_InitializeBroker")); |
416 if (!init_broker) { | 422 if (!init_broker) { |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 GetHistogramName(is_broker_, "LoadTime", path), | 608 GetHistogramName(is_broker_, "LoadTime", path), |
603 base::TimeDelta::FromMilliseconds(1), | 609 base::TimeDelta::FromMilliseconds(1), |
604 base::TimeDelta::FromSeconds(10), | 610 base::TimeDelta::FromSeconds(10), |
605 50, | 611 50, |
606 base::HistogramBase::kUmaTargetedHistogramFlag); | 612 base::HistogramBase::kUmaTargetedHistogramFlag); |
607 | 613 |
608 histogram->AddTime(load_time); | 614 histogram->AddTime(load_time); |
609 } | 615 } |
610 | 616 |
611 } // namespace content | 617 } // namespace content |
OLD | NEW |