Add ICU message format support
[chromium-blink-merge.git] / chrome / common / chrome_content_client.h
blob8b77d22b0c745469d0ae6cdf79ac5c0ff097fe3f
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
3 // found in the LICENSE file.
5 #ifndef CHROME_COMMON_CHROME_CONTENT_CLIENT_H_
6 #define CHROME_COMMON_CHROME_CONTENT_CLIENT_H_
8 #include <string>
9 #include <vector>
11 #include "base/compiler_specific.h"
12 #include "base/files/file_path.h"
13 #include "content/public/common/content_client.h"
15 #if defined(ENABLE_PLUGINS)
16 #include "content/public/common/pepper_plugin_info.h"
17 #endif
19 // Returns the user agent of Chrome.
20 std::string GetUserAgent();
22 class ChromeContentClient : public content::ContentClient {
23 public:
24 static const char kPDFPluginName[];
25 static const char kPDFPluginPath[];
26 static const char kRemotingViewerPluginPath[];
28 // The methods below are called by child processes to set the function
29 // pointers for built-in plugins. We avoid linking these plugins into
30 // chrome_common because then on Windows we would ship them twice because of
31 // the split DLL.
32 #if !defined(DISABLE_NACL)
33 static void SetNaClEntryFunctions(
34 content::PepperPluginInfo::GetInterfaceFunc get_interface,
35 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module,
36 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module);
37 #endif
39 #if defined(ENABLE_PLUGINS)
40 static void SetPDFEntryFunctions(
41 content::PepperPluginInfo::GetInterfaceFunc get_interface,
42 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module,
43 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module);
44 #endif
46 void SetActiveURL(const GURL& url) override;
47 void SetGpuInfo(const gpu::GPUInfo& gpu_info) override;
48 void AddPepperPlugins(
49 std::vector<content::PepperPluginInfo>* plugins) override;
50 void AddAdditionalSchemes(std::vector<std::string>* standard_schemes,
51 std::vector<std::string>* saveable_shemes) override;
52 std::string GetProduct() const override;
53 std::string GetUserAgent() const override;
54 base::string16 GetLocalizedString(int message_id) const override;
55 base::StringPiece GetDataResource(
56 int resource_id,
57 ui::ScaleFactor scale_factor) const override;
58 base::RefCountedStaticMemory* GetDataResourceBytes(
59 int resource_id) const override;
60 gfx::Image& GetNativeImageNamed(int resource_id) const override;
61 std::string GetProcessTypeNameInEnglish(int type) override;
63 #if defined(OS_MACOSX) && !defined(OS_IOS)
64 bool GetSandboxProfileForSandboxType(
65 int sandbox_type,
66 int* sandbox_profile_resource_id) const override;
67 #endif
69 void AddSecureSchemesAndOrigins(std::set<std::string>* schemes,
70 std::set<GURL>* origins) override;
72 void AddServiceWorkerSchemes(std::set<std::string>* schemes) override;
75 #endif // CHROME_COMMON_CHROME_CONTENT_CLIENT_H_