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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 content::PepperPluginInfo::GetInterfaceFunc get_interface, | 41 content::PepperPluginInfo::GetInterfaceFunc get_interface, |
42 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, | 42 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, |
43 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module); | 43 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module); |
44 #endif | 44 #endif |
45 | 45 |
46 #if defined(ENABLE_PLUGINS) | 46 #if defined(ENABLE_PLUGINS) |
47 static void SetPDFEntryFunctions( | 47 static void SetPDFEntryFunctions( |
48 content::PepperPluginInfo::GetInterfaceFunc get_interface, | 48 content::PepperPluginInfo::GetInterfaceFunc get_interface, |
49 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, | 49 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, |
50 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module); | 50 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module); |
| 51 |
| 52 // This returns the most recent plugin based on the plugin versions. |
| 53 // It does not make sense to call this on a vector that contains more than one |
| 54 // plugin type. This function may return a nullptr if given an empty vector. |
| 55 // The method is only visible for testing purposes. |
| 56 static content::PepperPluginInfo* FindMostRecentPlugin( |
| 57 const std::vector<content::PepperPluginInfo*>& plugins); |
51 #endif | 58 #endif |
52 | 59 |
53 void SetActiveURL(const GURL& url) override; | 60 void SetActiveURL(const GURL& url) override; |
54 void SetGpuInfo(const gpu::GPUInfo& gpu_info) override; | 61 void SetGpuInfo(const gpu::GPUInfo& gpu_info) override; |
55 void AddPepperPlugins( | 62 void AddPepperPlugins( |
56 std::vector<content::PepperPluginInfo>* plugins) override; | 63 std::vector<content::PepperPluginInfo>* plugins) override; |
57 void AddAdditionalSchemes(std::vector<std::string>* standard_schemes, | 64 void AddAdditionalSchemes(std::vector<std::string>* standard_schemes, |
58 std::vector<std::string>* saveable_shemes) override; | 65 std::vector<std::string>* saveable_shemes) override; |
59 std::string GetProduct() const override; | 66 std::string GetProduct() const override; |
60 std::string GetUserAgent() const override; | 67 std::string GetUserAgent() const override; |
(...skipping 12 matching lines...) Expand all Loading... |
73 int* sandbox_profile_resource_id) const override; | 80 int* sandbox_profile_resource_id) const override; |
74 #endif | 81 #endif |
75 | 82 |
76 void AddSecureSchemesAndOrigins(std::set<std::string>* schemes, | 83 void AddSecureSchemesAndOrigins(std::set<std::string>* schemes, |
77 std::set<GURL>* origins) override; | 84 std::set<GURL>* origins) override; |
78 | 85 |
79 void AddServiceWorkerSchemes(std::set<std::string>* schemes) override; | 86 void AddServiceWorkerSchemes(std::set<std::string>* schemes) override; |
80 }; | 87 }; |
81 | 88 |
82 #endif // CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ | 89 #endif // CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ |
OLD | NEW |