summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/pepper_webplugin_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/plugins/pepper_webplugin_impl.cc')
-rw-r--r--webkit/glue/plugins/pepper_webplugin_impl.cc18
1 files changed, 13 insertions, 5 deletions
diff --git a/webkit/glue/plugins/pepper_webplugin_impl.cc b/webkit/glue/plugins/pepper_webplugin_impl.cc
index df8aae0..32903b0 100644
--- a/webkit/glue/plugins/pepper_webplugin_impl.cc
+++ b/webkit/glue/plugins/pepper_webplugin_impl.cc
@@ -4,7 +4,6 @@
#include "webkit/glue/plugins/pepper_webplugin_impl.h"
-#include "base/file_path.h"
#include "base/message_loop.h"
#include "third_party/ppapi/c/pp_var.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
@@ -74,11 +73,16 @@ void WebPluginImpl::destroy() {
}
NPObject* WebPluginImpl::scriptableObject() {
- return GetNPObject(instance_->GetInstanceObject());
+ scoped_refptr<ObjectVar> object(
+ ObjectVar::FromPPVar(instance_->GetInstanceObject()));
+ if (object)
+ return object->np_object();
+ return NULL;
}
void WebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) {
- instance_->Paint(canvas, plugin_rect_, rect);
+ if (!instance_->IsFullscreen())
+ instance_->Paint(canvas, plugin_rect_, rect);
}
void WebPluginImpl::updateGeometry(
@@ -87,10 +91,12 @@ void WebPluginImpl::updateGeometry(
const WebVector<WebRect>& cut_outs_rects,
bool is_visible) {
plugin_rect_ = window_rect;
- instance_->ViewChanged(plugin_rect_, clip_rect);
+ if (!instance_->IsFullscreen())
+ instance_->ViewChanged(plugin_rect_, clip_rect);
}
void WebPluginImpl::updateFocus(bool focused) {
+ instance_->SetWebKitFocus(focused);
}
void WebPluginImpl::updateVisibility(bool visible) {
@@ -102,6 +108,8 @@ bool WebPluginImpl::acceptsInputEvents() {
bool WebPluginImpl::handleInputEvent(const WebKit::WebInputEvent& event,
WebKit::WebCursorInfo& cursor_info) {
+ if (instance_->IsFullscreen())
+ return false;
return instance_->HandleInputEvent(event, &cursor_info);
}
@@ -123,7 +131,7 @@ void WebPluginImpl::didReceiveData(const char* data, int data_length) {
void WebPluginImpl::didFinishLoading() {
if (document_loader_) {
- document_loader_->didFinishLoading(NULL);
+ document_loader_->didFinishLoading(NULL, 0);
document_loader_ = NULL;
}
}