| 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 "base/base_paths.h" | 5 #include "base/base_paths.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/debug/debugger.h" | 7 #include "base/debug/debugger.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 void SkiaPreCacheFont(const LOGFONT& logfont) { | 56 void SkiaPreCacheFont(const LOGFONT& logfont) { |
| 57 ppapi::proxy::PluginGlobals::Get()->PreCacheFontForFlash( | 57 ppapi::proxy::PluginGlobals::Get()->PreCacheFontForFlash( |
| 58 reinterpret_cast<const void*>(&logfont)); | 58 reinterpret_cast<const void*>(&logfont)); |
| 59 } | 59 } |
| 60 #endif | 60 #endif |
| 61 | 61 |
| 62 } // namespace | 62 } // namespace |
| 63 | 63 |
| 64 // Main function for starting the PPAPI plugin process. | 64 // Main function for starting the PPAPI plugin process. |
| 65 int PpapiPluginMain(const MainFunctionParams& parameters) { | 65 int PpapiPluginMain(const MainFunctionParams& parameters) { |
| 66 const CommandLine& command_line = parameters.command_line; | 66 const base::CommandLine& command_line = parameters.command_line; |
| 67 | 67 |
| 68 #if defined(OS_WIN) | 68 #if defined(OS_WIN) |
| 69 g_target_services = parameters.sandbox_info->target_services; | 69 g_target_services = parameters.sandbox_info->target_services; |
| 70 #endif | 70 #endif |
| 71 | 71 |
| 72 // If |g_target_services| is not null this process is sandboxed. One side | 72 // If |g_target_services| is not null this process is sandboxed. One side |
| 73 // effect is that we can't pop dialogs like ChildProcess::WaitForDebugger() | 73 // effect is that we can't pop dialogs like ChildProcess::WaitForDebugger() |
| 74 // does. | 74 // does. |
| 75 if (command_line.HasSwitch(switches::kPpapiStartupDialog)) { | 75 if (command_line.HasSwitch(switches::kPpapiStartupDialog)) { |
| 76 if (g_target_services) | 76 if (g_target_services) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 #if defined(OS_WIN) | 137 #if defined(OS_WIN) |
| 138 SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont); | 138 SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont); |
| 139 #endif | 139 #endif |
| 140 | 140 |
| 141 main_message_loop.Run(); | 141 main_message_loop.Run(); |
| 142 return 0; | 142 return 0; |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace content | 145 } // namespace content |
| OLD | NEW |