Home | History | Annotate | Download | only in common
      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.
      4 
      5 #ifndef CHROME_COMMON_CHROME_CONTENT_CLIENT_H_
      6 #define CHROME_COMMON_CHROME_CONTENT_CLIENT_H_
      7 
      8 #include <string>
      9 #include <vector>
     10 
     11 #include "base/compiler_specific.h"
     12 #include "base/files/file_path.h"
     13 #include "content/public/common/content_client.h"
     14 
     15 // Returns the user agent of Chrome.
     16 std::string GetUserAgent();
     17 
     18 class ChromeContentClient : public content::ContentClient {
     19  public:
     20   static const char* const kPDFPluginName;
     21   static const char* const kNaClPluginName;
     22   static const char* const kNaClOldPluginName;
     23   static const char* const kRemotingViewerPluginPath;
     24 
     25   virtual void SetActiveURL(const GURL& url) OVERRIDE;
     26   virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) OVERRIDE;
     27   virtual void AddPepperPlugins(
     28       std::vector<content::PepperPluginInfo>* plugins) OVERRIDE;
     29   virtual void AddAdditionalSchemes(
     30       std::vector<std::string>* standard_schemes,
     31       std::vector<std::string>* saveable_shemes) OVERRIDE;
     32   virtual std::string GetProduct() const OVERRIDE;
     33   virtual std::string GetUserAgent() const OVERRIDE;
     34   virtual base::string16 GetLocalizedString(int message_id) const OVERRIDE;
     35   virtual base::StringPiece GetDataResource(
     36       int resource_id,
     37       ui::ScaleFactor scale_factor) const OVERRIDE;
     38   virtual base::RefCountedStaticMemory* GetDataResourceBytes(
     39       int resource_id) const OVERRIDE;
     40   virtual gfx::Image& GetNativeImageNamed(int resource_id) const OVERRIDE;
     41   virtual std::string GetProcessTypeNameInEnglish(int type) OVERRIDE;
     42 
     43 #if defined(OS_MACOSX) && !defined(OS_IOS)
     44   virtual bool GetSandboxProfileForSandboxType(
     45       int sandbox_type,
     46       int* sandbox_profile_resource_id) const OVERRIDE;
     47   virtual std::string GetCarbonInterposePath() const OVERRIDE;
     48 #endif
     49 };
     50 
     51 #endif  // CHROME_COMMON_CHROME_CONTENT_CLIENT_H_
     52