diff options
Diffstat (limited to 'content/public')
-rw-r--r-- | content/public/common/content_client.cc | 37 | ||||
-rw-r--r-- | content/public/common/content_client.h | 24 | ||||
-rw-r--r-- | content/public/plugin/content_plugin_client.h | 4 |
3 files changed, 52 insertions, 13 deletions
diff --git a/content/public/common/content_client.cc b/content/public/common/content_client.cc index a6128b1..8c40196 100644 --- a/content/public/common/content_client.cc +++ b/content/public/common/content_client.cc @@ -44,4 +44,41 @@ ContentClient::ContentClient() ContentClient::~ContentClient() { } +bool ContentClient::HasWebUIScheme(const GURL& url) const { + return false; +} + +bool ContentClient::CanHandleWhileSwappedOut(const IPC::Message& message) { + return false; +} + +std::string ContentClient::GetUserAgent() const { + return std::string(); +} + +string16 ContentClient::GetLocalizedString(int message_id) const { + return string16(); +} + +base::StringPiece ContentClient::GetDataResource( + int resource_id, + ui::ScaleFactor scale_factor) const { + return base::StringPiece(); +} + +#if defined(OS_WIN) +bool ContentClient::SandboxPlugin(CommandLine* command_line, + sandbox::TargetPolicy* policy) { + return false; +} +#endif + +#if defined(OS_MACOSX) +bool ContentClient::GetSandboxProfileForSandboxType( + int sandbox_type, + int* sandbox_profile_resource_id) const { + return false; +} +#endif + } // namespace content diff --git a/content/public/common/content_client.h b/content/public/common/content_client.h index 1190328..c4cbe82 100644 --- a/content/public/common/content_client.h +++ b/content/public/common/content_client.h @@ -82,48 +82,48 @@ class CONTENT_EXPORT ContentClient { void set_utility(ContentUtilityClient* u) { utility_ = u; } // Sets the currently active URL. Use GURL() to clear the URL. - virtual void SetActiveURL(const GURL& url) = 0; + virtual void SetActiveURL(const GURL& url) {} // Sets the data on the current gpu. - virtual void SetGpuInfo(const content::GPUInfo& gpu_info) = 0; + virtual void SetGpuInfo(const content::GPUInfo& gpu_info) {} // Gives the embedder a chance to register its own pepper plugins. virtual void AddPepperPlugins( - std::vector<content::PepperPluginInfo>* plugins) = 0; + std::vector<content::PepperPluginInfo>* plugins) {} // Gives the embedder a chance to register its own internal NPAPI plugins. virtual void AddNPAPIPlugins( - webkit::npapi::PluginList* plugin_list) = 0; + webkit::npapi::PluginList* plugin_list) {} // Gives the embedder a chance to register its own standard and saveable // url schemes early on in the startup sequence. virtual void AddAdditionalSchemes( std::vector<std::string>* standard_schemes, - std::vector<std::string>* savable_schemes) = 0; + std::vector<std::string>* savable_schemes) {} // Returns true if the url has a scheme for WebUI. See also // WebUIControllerFactory::UseWebUIForURL in the browser process. - virtual bool HasWebUIScheme(const GURL& url) const = 0; + virtual bool HasWebUIScheme(const GURL& url) const; // Returns whether the given message should be processed in the browser on // behalf of a swapped out renderer. - virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) = 0; + virtual bool CanHandleWhileSwappedOut(const IPC::Message& message); // Returns the user agent. - virtual std::string GetUserAgent() const = 0; + virtual std::string GetUserAgent() const; // Returns a string resource given its id. - virtual string16 GetLocalizedString(int message_id) const = 0; + virtual string16 GetLocalizedString(int message_id) const; // Return the contents of a resource in a StringPiece given the resource id. virtual base::StringPiece GetDataResource( int resource_id, - ui::ScaleFactor scale_factor) const = 0; + ui::ScaleFactor scale_factor) const; #if defined(OS_WIN) // Allows the embedder to sandbox a plugin, and apply a custom policy. virtual bool SandboxPlugin(CommandLine* command_line, - sandbox::TargetPolicy* policy) = 0; + sandbox::TargetPolicy* policy); #endif #if defined(OS_MACOSX) @@ -136,7 +136,7 @@ class CONTENT_EXPORT ContentClient { // the sandbox profile to use and true is returned. virtual bool GetSandboxProfileForSandboxType( int sandbox_type, - int* sandbox_profile_resource_id) const = 0; + int* sandbox_profile_resource_id) const; #endif private: diff --git a/content/public/plugin/content_plugin_client.h b/content/public/plugin/content_plugin_client.h index 003ac86..499579a 100644 --- a/content/public/plugin/content_plugin_client.h +++ b/content/public/plugin/content_plugin_client.h @@ -16,9 +16,11 @@ class CONTENT_EXPORT ContentPluginClient { public: // Notifies that a plugin process has started. virtual void PluginProcessStarted(const string16& plugin_name) {} + + protected: + virtual ~ContentPluginClient() {} }; } // namespace content #endif // CONTENT_PUBLIC_PLUGIN_CONTENT_PLUGIN_CLIENT_H_ - |