#include "content/renderer/npapi/webplugin_delegate_proxy.h"
-#if defined(TOOLKIT_GTK)
-#include <gtk/gtk.h>
-#elif defined(USE_X11)
-#include <cairo/cairo.h>
-#endif
-
#include <algorithm>
#include "base/auto_reset.h"
#include "base/basictypes.h"
#include "base/command_line.h"
-#include "base/file_util.h"
+#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
// shouldn't happen, since if we got here the plugin should exist) or the
// plugin crashed on initialization.
if (!info_.path.empty()) {
- render_view_->main_render_frame()->PluginCrashed(
+ render_view_->GetMainRenderFrame()->PluginCrashed(
info_.path, base::kNullProcessId);
LOG(ERROR) << "Plug-in crashed on start";
}
plugin_->Invalidate();
}
- if (!channel_host_->expecting_shutdown()) {
- render_view_->main_render_frame()->PluginCrashed(
+ if (channel_host_.get() && !channel_host_->expecting_shutdown()) {
+ render_view_->GetMainRenderFrame()->PluginCrashed(
info_.path, channel_host_->peer_pid());
}
void WebPluginDelegateProxy::SendUpdateGeometry(
bool bitmaps_changed) {
+ if (!channel_host_.get())
+ return;
+
PluginMsg_UpdateGeometry_Param param;
param.window_rect = plugin_rect_;
param.clip_rect = clip_rect_;
if (!memory->get())
return false;
#endif
-#if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID)
+#if defined(OS_POSIX) && !defined(OS_ANDROID)
TransportDIB::Handle handle;
IPC::Message* msg = new ViewHostMsg_AllocTransportDIB(size, false, &handle);
if (!RenderThreadImpl::current()->Send(msg))
if (npobject_)
return WebBindings::retainObject(npobject_);
+ if (!channel_host_.get())
+ return NULL;
+
int route_id = MSG_ROUTING_NONE;
Send(new PluginMsg_GetPluginScriptableObject(instance_id_, &route_id));
if (route_id == MSG_ROUTING_NONE)
bool WebPluginDelegateProxy::HandleInputEvent(
const WebInputEvent& event,
WebCursor::CursorInfo* cursor_info) {
- bool handled;
+ bool handled = false;
WebCursor cursor;
// A windowless plugin can enter a modal loop in the context of a
// NPP_HandleEvent call, in which case we need to pump messages to