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

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

Issue 7790013: Clean up plugin constants (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 months 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
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_content_client.h" 5 #include "chrome/common/chrome_content_client.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/path_service.h" 9 #include "base/path_service.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
11 #include "base/string_number_conversions.h" 11 #include "base/string_number_conversions.h"
12 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
13 #include "base/string_split.h" 13 #include "base/string_split.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/win/windows_version.h" 15 #include "base/win/windows_version.h"
16 #include "chrome/common/child_process_logging.h" 16 #include "chrome/common/child_process_logging.h"
17 #include "chrome/common/chrome_paths.h" 17 #include "chrome/common/chrome_paths.h"
18 #include "chrome/common/chrome_switches.h" 18 #include "chrome/common/chrome_switches.h"
19 #include "chrome/common/chrome_version_info.h" 19 #include "chrome/common/chrome_version_info.h"
20 #include "content/common/pepper_plugin_registry.h" 20 #include "content/common/pepper_plugin_registry.h"
21 #include "remoting/client/plugin/pepper_entrypoints.h" 21 #include "remoting/client/plugin/pepper_entrypoints.h"
22 #include "ui/base/l10n/l10n_util.h" 22 #include "ui/base/l10n/l10n_util.h"
23 #include "ui/base/resource/resource_bundle.h" 23 #include "ui/base/resource/resource_bundle.h"
24 #include "webkit/glue/user_agent.h" 24 #include "webkit/glue/user_agent.h"
25 #include "webkit/plugins/plugin_constants.h"
25 26
26 #if defined(OS_WIN) 27 #if defined(OS_WIN)
27 #include "content/common/sandbox_policy.h" 28 #include "content/common/sandbox_policy.h"
28 #include "sandbox/src/sandbox.h" 29 #include "sandbox/src/sandbox.h"
29 #endif 30 #endif
30 31
31 #if !defined(NACL_WIN64) // The code this needs isn't linked on Win64 builds. 32 #if !defined(NACL_WIN64) // The code this needs isn't linked on Win64 builds.
32 #include "chrome/common/render_messages.h" 33 #include "chrome/common/render_messages.h"
33 #endif 34 #endif
34 35
(...skipping 18 matching lines...) Expand all
53 const FilePath::CharType kRemotingViewerPluginPath[] = 54 const FilePath::CharType kRemotingViewerPluginPath[] =
54 FILE_PATH_LITERAL("internal-remoting-viewer"); 55 FILE_PATH_LITERAL("internal-remoting-viewer");
55 // Use a consistent MIME-type regardless of branding. 56 // Use a consistent MIME-type regardless of branding.
56 const char* kRemotingViewerPluginMimeType = 57 const char* kRemotingViewerPluginMimeType =
57 "application/vnd.chromium.remoting-viewer"; 58 "application/vnd.chromium.remoting-viewer";
58 // TODO(wez): Remove the old MIME-type once client code no longer needs it. 59 // TODO(wez): Remove the old MIME-type once client code no longer needs it.
59 const char* kRemotingViewerPluginOldMimeType = 60 const char* kRemotingViewerPluginOldMimeType =
60 "pepper-application/x-chromoting"; 61 "pepper-application/x-chromoting";
61 #endif 62 #endif
62 63
63 const char* kFlashPluginName = "Shockwave Flash";
64 const char* kFlashPluginSwfMimeType = "application/x-shockwave-flash";
65 const char* kFlashPluginSwfExtension = "swf";
66 const char* kFlashPluginSwfDescription = "Shockwave Flash";
67 const char* kFlashPluginSplMimeType = "application/futuresplash";
68 const char* kFlashPluginSplExtension = "spl";
69 const char* kFlashPluginSplDescription = "FutureSplash Player";
70
71 #if !defined(NACL_WIN64) // The code this needs isn't linked on Win64 builds. 64 #if !defined(NACL_WIN64) // The code this needs isn't linked on Win64 builds.
72
73 // Appends the known built-in plugins to the given vector. Some built-in 65 // Appends the known built-in plugins to the given vector. Some built-in
74 // plugins are "internal" which means they are compiled into the Chrome binary, 66 // plugins are "internal" which means they are compiled into the Chrome binary,
75 // and some are extra shared libraries distributed with the browser (these are 67 // and some are extra shared libraries distributed with the browser (these are
76 // not marked internal, aside from being automatically registered, they're just 68 // not marked internal, aside from being automatically registered, they're just
77 // regular plugins). 69 // regular plugins).
78 void ComputeBuiltInPlugins(std::vector<PepperPluginInfo>* plugins) { 70 void ComputeBuiltInPlugins(std::vector<PepperPluginInfo>* plugins) {
79 // PDF. 71 // PDF.
80 // 72 //
81 // Once we're sandboxed, we can't know if the PDF plugin is available or not; 73 // Once we're sandboxed, we can't know if the PDF plugin is available or not;
82 // but (on Linux) this function is always called once before we're sandboxed. 74 // but (on Linux) this function is always called once before we're sandboxed.
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0); 389 policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0);
398 policy->SetTokenLevel( 390 policy->SetTokenLevel(
399 sandbox::USER_UNPROTECTED, sandbox::USER_UNPROTECTED); 391 sandbox::USER_UNPROTECTED, sandbox::USER_UNPROTECTED);
400 } 392 }
401 393
402 return true; 394 return true;
403 } 395 }
404 #endif 396 #endif
405 397
406 } // namespace chrome 398 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/pepper_flash_component_installer.cc ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698