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/common/chrome_paths.h" | 5 #include "chrome/common/chrome_paths.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 #if defined(OS_WIN) | 68 #if defined(OS_WIN) |
69 FILE_PATH_LITERAL("pepper/libppeffects.dll"); | 69 FILE_PATH_LITERAL("pepper/libppeffects.dll"); |
70 #elif defined(OS_MACOSX) | 70 #elif defined(OS_MACOSX) |
71 FILE_PATH_LITERAL("pepper/libppeffects.plugin"); | 71 FILE_PATH_LITERAL("pepper/libppeffects.plugin"); |
72 #else // Linux and Chrome OS | 72 #else // Linux and Chrome OS |
73 FILE_PATH_LITERAL("pepper/libppeffects.so"); | 73 FILE_PATH_LITERAL("pepper/libppeffects.so"); |
74 #endif | 74 #endif |
75 | 75 |
76 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 76 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
77 | 77 |
78 const base::FilePath::CharType kO3DPluginFileName[] = | |
79 FILE_PATH_LITERAL("pepper/libppo3dautoplugin.so"); | |
80 | |
81 const base::FilePath::CharType kO1DPluginFileName[] = | 78 const base::FilePath::CharType kO1DPluginFileName[] = |
82 FILE_PATH_LITERAL("pepper/libppo1d.so"); | 79 FILE_PATH_LITERAL("pepper/libppo1d.so"); |
83 | 80 |
84 const base::FilePath::CharType kGTalkPluginFileName[] = | 81 const base::FilePath::CharType kGTalkPluginFileName[] = |
85 FILE_PATH_LITERAL("pepper/libppgoogletalk.so"); | 82 FILE_PATH_LITERAL("pepper/libppgoogletalk.so"); |
86 | 83 |
87 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 84 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
88 | 85 |
89 #if defined(OS_LINUX) | 86 #if defined(OS_LINUX) |
90 // The path to the external extension <id>.json files. | 87 // The path to the external extension <id>.json files. |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 cur = cur.DirName(); | 324 cur = cur.DirName(); |
328 cur = cur.DirName(); | 325 cur = cur.DirName(); |
329 } | 326 } |
330 #else | 327 #else |
331 if (!GetInternalPluginsDirectory(&cur)) | 328 if (!GetInternalPluginsDirectory(&cur)) |
332 return false; | 329 return false; |
333 #endif | 330 #endif |
334 cur = cur.Append(FILE_PATH_LITERAL("pnacl")); | 331 cur = cur.Append(FILE_PATH_LITERAL("pnacl")); |
335 break; | 332 break; |
336 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 333 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
337 case chrome::FILE_O3D_PLUGIN: | |
338 if (!PathService::Get(base::DIR_MODULE, &cur)) | |
339 return false; | |
340 cur = cur.Append(kO3DPluginFileName); | |
341 break; | |
342 case chrome::FILE_O1D_PLUGIN: | 334 case chrome::FILE_O1D_PLUGIN: |
343 if (!PathService::Get(base::DIR_MODULE, &cur)) | 335 if (!PathService::Get(base::DIR_MODULE, &cur)) |
344 return false; | 336 return false; |
345 cur = cur.Append(kO1DPluginFileName); | 337 cur = cur.Append(kO1DPluginFileName); |
346 break; | 338 break; |
347 case chrome::FILE_GTALK_PLUGIN: | 339 case chrome::FILE_GTALK_PLUGIN: |
348 if (!PathService::Get(base::DIR_MODULE, &cur)) | 340 if (!PathService::Get(base::DIR_MODULE, &cur)) |
349 return false; | 341 return false; |
350 cur = cur.Append(kGTalkPluginFileName); | 342 cur = cur.Append(kGTalkPluginFileName); |
351 break; | 343 break; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 return true; | 517 return true; |
526 } | 518 } |
527 | 519 |
528 // This cannot be done as a static initializer sadly since Visual Studio will | 520 // This cannot be done as a static initializer sadly since Visual Studio will |
529 // eliminate this object file if there is no direct entry point into it. | 521 // eliminate this object file if there is no direct entry point into it. |
530 void RegisterPathProvider() { | 522 void RegisterPathProvider() { |
531 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 523 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
532 } | 524 } |
533 | 525 |
534 } // namespace chrome | 526 } // namespace chrome |
OLD | NEW |