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

Side by Side Diff: chrome/common/chrome_paths.cc

Issue 8899014: Register O3D/GTalk PPAPI plugins if available (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use DIR_MODULE instead of InternalPlugins Created 9 years 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
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/common/chrome_paths.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #endif 53 #endif
54 54
55 #if defined(OS_POSIX) && !defined(OS_MACOSX) 55 #if defined(OS_POSIX) && !defined(OS_MACOSX)
56 // File name of the nacl_helper and nacl_helper_bootstrap, Linux only. 56 // File name of the nacl_helper and nacl_helper_bootstrap, Linux only.
57 const FilePath::CharType kInternalNaClHelperFileName[] = 57 const FilePath::CharType kInternalNaClHelperFileName[] =
58 FILE_PATH_LITERAL("nacl_helper"); 58 FILE_PATH_LITERAL("nacl_helper");
59 const FilePath::CharType kInternalNaClHelperBootstrapFileName[] = 59 const FilePath::CharType kInternalNaClHelperBootstrapFileName[] =
60 FILE_PATH_LITERAL("nacl_helper_bootstrap"); 60 FILE_PATH_LITERAL("nacl_helper_bootstrap");
61 #endif 61 #endif
62 62
63
64 #if defined(OS_POSIX) && !defined(OS_MACOSX)
65
66 const FilePath::CharType kO3DPluginFileName[] =
67 FILE_PATH_LITERAL("pepper/libppo3dautoplugin.so");
68
69 const FilePath::CharType kGTalkPluginFileName[] =
70 FILE_PATH_LITERAL("pepper/libppgoogletalk.so");
71
72 #endif // defined(OS_POSIX) && !defined(OS_MACOSX)
63 } // namespace 73 } // namespace
64 74
65 namespace chrome { 75 namespace chrome {
66 76
67 // Gets the path for internal plugins. 77 // Gets the path for internal plugins.
68 bool GetInternalPluginsDirectory(FilePath* result) { 78 bool GetInternalPluginsDirectory(FilePath* result) {
69 #if defined(OS_MACOSX) 79 #if defined(OS_MACOSX)
70 // If called from Chrome, get internal plugins from a subdirectory of the 80 // If called from Chrome, get internal plugins from a subdirectory of the
71 // framework. 81 // framework.
72 if (base::mac::AmIBundled()) { 82 if (base::mac::AmIBundled()) {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 case chrome::FILE_NACL_HELPER: 256 case chrome::FILE_NACL_HELPER:
247 if (!PathService::Get(base::DIR_MODULE, &cur)) 257 if (!PathService::Get(base::DIR_MODULE, &cur))
248 return false; 258 return false;
249 cur = cur.Append(kInternalNaClHelperFileName); 259 cur = cur.Append(kInternalNaClHelperFileName);
250 break; 260 break;
251 case chrome::FILE_NACL_HELPER_BOOTSTRAP: 261 case chrome::FILE_NACL_HELPER_BOOTSTRAP:
252 if (!PathService::Get(base::DIR_MODULE, &cur)) 262 if (!PathService::Get(base::DIR_MODULE, &cur))
253 return false; 263 return false;
254 cur = cur.Append(kInternalNaClHelperBootstrapFileName); 264 cur = cur.Append(kInternalNaClHelperBootstrapFileName);
255 break; 265 break;
266 case chrome::FILE_O3D_PLUGIN:
267 if (!PathService::Get(base::DIR_MODULE, &cur))
268 return false;
269 cur = cur.Append(kO3DPluginFileName);
270 break;
271 case chrome::FILE_GTALK_PLUGIN:
272 if (!PathService::Get(base::DIR_MODULE, &cur))
273 return false;
274 cur = cur.Append(kGTalkPluginFileName);
275 break;
256 #endif 276 #endif
257 case chrome::FILE_RESOURCES_PACK: 277 case chrome::FILE_RESOURCES_PACK:
258 #if defined(OS_MACOSX) 278 #if defined(OS_MACOSX)
259 if (base::mac::AmIBundled()) { 279 if (base::mac::AmIBundled()) {
260 cur = base::mac::MainAppBundlePath(); 280 cur = base::mac::MainAppBundlePath();
261 cur = cur.Append(FILE_PATH_LITERAL("Resources")) 281 cur = cur.Append(FILE_PATH_LITERAL("Resources"))
262 .Append(FILE_PATH_LITERAL("resources.pak")); 282 .Append(FILE_PATH_LITERAL("resources.pak"));
263 break; 283 break;
264 } 284 }
265 // If we're not bundled on mac, resources.pak should be next to the 285 // If we're not bundled on mac, resources.pak should be next to the
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 return true; 426 return true;
407 } 427 }
408 428
409 // This cannot be done as a static initializer sadly since Visual Studio will 429 // This cannot be done as a static initializer sadly since Visual Studio will
410 // eliminate this object file if there is no direct entry point into it. 430 // eliminate this object file if there is no direct entry point into it.
411 void RegisterPathProvider() { 431 void RegisterPathProvider() {
412 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 432 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
413 } 433 }
414 434
415 } // namespace chrome 435 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698