#include <string>
#include <vector>
+#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "content/public/common/content_client.h"
class WebMediaStreamCenterClient;
class WebPlugin;
class WebPluginContainer;
+class WebPluginPlaceholder;
class WebPrescientNetworking;
class WebRTCPeerConnectionHandler;
class WebRTCPeerConnectionHandlerClient;
struct WebURLError;
}
+namespace media {
+struct KeySystemInfo;
+}
+
namespace content {
class BrowserPluginDelegate;
class DocumentState;
class RenderFrame;
class RenderView;
class SynchronousCompositor;
-struct KeySystemInfo;
struct WebPluginInfo;
// Embedder API for participating in renderer logic.
// none.
virtual SkBitmap* GetSadWebViewBitmap();
- // Returns the default text encoding.
- virtual std::string GetDefaultEncoding();
+ // Allows the embedder to create a plugin placeholder instead of a plugin.
+ // Called before OverrideCreatePlugin. May return null to decline to provide
+ // a plugin placeholder.
+ virtual scoped_ptr<blink::WebPluginPlaceholder> CreatePluginPlaceholder(
+ RenderFrame* render_frame,
+ blink::WebLocalFrame* frame,
+ const blink::WebPluginParams& params);
// Allows the embedder to override creating a plugin. If it returns true, then
// |plugin| will contain the created plugin, although it could be NULL. If it
// Creates a delegate for browser plugin.
virtual BrowserPluginDelegate* CreateBrowserPluginDelegate(
RenderFrame* render_frame,
- const std::string& mime_type);
+ const std::string& mime_type,
+ const GURL& original_url);
// Returns true if the embedder has an error page to show for the given http
// status code. If so |error_domain| should be set to according to WebURLError
// Gives the embedder a chance to register the key system(s) it supports by
// populating |key_systems|.
- virtual void AddKeySystems(std::vector<KeySystemInfo>* key_systems);
+ virtual void AddKeySystems(std::vector<media::KeySystemInfo>* key_systems);
// Returns true if we should report a detailed message (including a stack
// trace) for console [logs|errors|exceptions]. |source| is the WebKit-
// Returns true if dev channel APIs are available for plugins.
virtual bool IsPluginAllowedToUseDevChannelAPIs();
+
+ // Returns a user agent override specific for |url|, or empty string if
+ // default user agent should be used.
+ virtual std::string GetUserAgentOverrideForURL(const GURL& url);
};
} // namespace content