class Range;
}
+namespace gpu {
+struct Mailbox;
+}
+
namespace content {
class BrowserPluginHostFactory;
class CONTENT_EXPORT BrowserPluginGuest
: public JavaScriptDialogManager,
public WebContentsDelegate,
- public WebContentsObserver,
- public base::SupportsWeakPtr<BrowserPluginGuest> {
+ public WebContentsObserver {
public:
typedef base::Callback<void(bool)> GeolocationCallback;
virtual ~BrowserPluginGuest();
WebContentsImpl* web_contents,
BrowserPluginGuest* opener);
+ // Returns a WeakPtr to this BrowserPluginGuest.
+ base::WeakPtr<BrowserPluginGuest> AsWeakPtr();
+
// Called when the embedder WebContents is destroyed to give the
// BrowserPluginGuest an opportunity to clean up after itself.
void EmbedderDestroyed();
WebContents* web_contents,
const MediaStreamRequest& request,
const MediaResponseCallback& callback) OVERRIDE;
+ virtual bool PreHandleGestureEvent(
+ content::WebContents* source,
+ const blink::WebGestureEvent& event) OVERRIDE;
// JavaScriptDialogManager implementation.
virtual void RunJavaScriptDialog(
// BrowserPluginGuest is already destroyed.
static void AcknowledgeBufferPresent(int route_id,
int gpu_host_id,
- const std::string& mailbox_name,
+ const gpu::Mailbox& mailbox,
uint32 sync_point);
// Returns whether BrowserPluginGuest is interested in receiving the given
BrowserPluginGuest::factory_ = factory;
}
+ void SetZoom(double zoom_factor);
+
private:
class EmbedderWebContentsObserver;
friend class TestBrowserPluginGuest;
bool is_in_destruction_;
+ // Text input type states.
+ ui::TextInputType last_text_input_type_;
+ ui::TextInputMode last_input_mode_;
+ bool last_can_compose_inline_;
+
// This is a queue of messages that are destined to be sent to the embedder
// once the guest is attached to a particular embedder.
std::queue<IPC::Message*> pending_messages_;