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 #ifndef CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ | 5 #ifndef CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ |
6 #define CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ | 6 #define CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "chrome/common/origin_trials/chrome_origin_trial_policy.h" | 16 #include "chrome/common/origin_trials/chrome_origin_trial_policy.h" |
17 #include "content/public/common/content_client.h" | 17 #include "content/public/common/content_client.h" |
| 18 #include "ppapi/features/features.h" |
18 | 19 |
19 #if defined(ENABLE_PLUGINS) | 20 #if BUILDFLAG(ENABLE_PLUGINS) |
20 #include "content/public/common/pepper_plugin_info.h" | 21 #include "content/public/common/pepper_plugin_info.h" |
21 #endif | 22 #endif |
22 | 23 |
23 #include "url/url_util.h" | 24 #include "url/url_util.h" |
24 | 25 |
25 // Returns the user agent of Chrome. | 26 // Returns the user agent of Chrome. |
26 std::string GetUserAgent(); | 27 std::string GetUserAgent(); |
27 | 28 |
28 class ChromeContentClient : public content::ContentClient { | 29 class ChromeContentClient : public content::ContentClient { |
29 public: | 30 public: |
(...skipping 14 matching lines...) Expand all Loading... |
44 // pointers for built-in plugins. We avoid linking these plugins into | 45 // pointers for built-in plugins. We avoid linking these plugins into |
45 // chrome_common because then on Windows we would ship them twice because of | 46 // chrome_common because then on Windows we would ship them twice because of |
46 // the split DLL. | 47 // the split DLL. |
47 #if !defined(DISABLE_NACL) | 48 #if !defined(DISABLE_NACL) |
48 static void SetNaClEntryFunctions( | 49 static void SetNaClEntryFunctions( |
49 content::PepperPluginInfo::GetInterfaceFunc get_interface, | 50 content::PepperPluginInfo::GetInterfaceFunc get_interface, |
50 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, | 51 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, |
51 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module); | 52 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module); |
52 #endif | 53 #endif |
53 | 54 |
54 #if defined(ENABLE_PLUGINS) | 55 #if BUILDFLAG(ENABLE_PLUGINS) |
55 static void SetPDFEntryFunctions( | 56 static void SetPDFEntryFunctions( |
56 content::PepperPluginInfo::GetInterfaceFunc get_interface, | 57 content::PepperPluginInfo::GetInterfaceFunc get_interface, |
57 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, | 58 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, |
58 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module); | 59 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module); |
59 | 60 |
60 // This returns the most recent plugin based on the plugin versions. In the | 61 // This returns the most recent plugin based on the plugin versions. In the |
61 // event of a tie, a debug plugin will be considered more recent than a | 62 // event of a tie, a debug plugin will be considered more recent than a |
62 // non-debug plugin. | 63 // non-debug plugin. |
63 // It does not make sense to call this on a vector that contains more than one | 64 // It does not make sense to call this on a vector that contains more than one |
64 // plugin type. This function may return a nullptr if given an empty vector. | 65 // plugin type. This function may return a nullptr if given an empty vector. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 106 |
106 #if defined(OS_ANDROID) | 107 #if defined(OS_ANDROID) |
107 media::MediaClientAndroid* GetMediaClientAndroid() override; | 108 media::MediaClientAndroid* GetMediaClientAndroid() override; |
108 #endif // OS_ANDROID | 109 #endif // OS_ANDROID |
109 | 110 |
110 private: | 111 private: |
111 std::unique_ptr<ChromeOriginTrialPolicy> origin_trial_policy_; | 112 std::unique_ptr<ChromeOriginTrialPolicy> origin_trial_policy_; |
112 }; | 113 }; |
113 | 114 |
114 #endif // CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ | 115 #endif // CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ |
OLD | NEW |