Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2239)

Unified Diff: content/common/npobject_proxy.cc

Issue 7983032: Add NPChannelBase::GetModalDialogEvent() to avoid content/plugin/ include from npobject_proxy.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased after http://codereview.chromium.org/7982026 Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/np_channel_base.cc ('k') | content/plugin/plugin_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/npobject_proxy.cc
diff --git a/content/common/npobject_proxy.cc b/content/common/npobject_proxy.cc
index 436f61ff5a1251992589da5f4295b6299545aae7..4a376116bd057cf6e71d063649f83114be8febbf 100644
--- a/content/common/npobject_proxy.cc
+++ b/content/common/npobject_proxy.cc
@@ -4,9 +4,9 @@
#include "content/common/npobject_proxy.h"
+#include "content/common/np_channel_base.h"
#include "content/common/npobject_util.h"
#include "content/common/plugin_messages.h"
-#include "content/plugin/plugin_channel.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/plugins/npapi/plugin_instance.h"
@@ -207,12 +207,9 @@ bool NPObjectProxy::NPInvokePrivate(NPP npp,
// queue while waiting for a reply. We need to do this to simulate what
// happens when everything runs in-process (while calling MessageBox window
// messages are pumped).
- if (IsPluginProcess()) {
- PluginChannel* channel = static_cast<PluginChannel*>(proxy->channel_.get());
- if (channel) {
- msg->set_pump_messages_event(
- channel->GetModalDialogEvent(containing_window));
- }
+ if (IsPluginProcess() && proxy->channel()) {
+ msg->set_pump_messages_event(
+ proxy->channel()->GetModalDialogEvent(containing_window));
}
GURL page_url = proxy->page_url_;
@@ -430,12 +427,9 @@ bool NPObjectProxy::NPNConstruct(NPObject *obj,
proxy->route_id_, args_param, &param_result, &result);
// See comment in NPObjectProxy::NPInvokePrivate.
- if (IsPluginProcess()) {
- PluginChannel* channel = static_cast<PluginChannel*>(proxy->channel_.get());
- if (channel) {
- msg->set_pump_messages_event(
- channel->GetModalDialogEvent(proxy->containing_window_));
- }
+ if (IsPluginProcess() && proxy->channel()) {
+ msg->set_pump_messages_event(
+ proxy->channel()->GetModalDialogEvent(proxy->containing_window_));
}
GURL page_url = proxy->page_url_;
@@ -483,12 +477,9 @@ bool NPObjectProxy::NPNEvaluate(NPP npp,
&result);
// See comment in NPObjectProxy::NPInvokePrivate.
- if (IsPluginProcess()) {
- PluginChannel* channel = static_cast<PluginChannel*>(proxy->channel_.get());
- if (channel) {
- msg->set_pump_messages_event(
- channel->GetModalDialogEvent(proxy->containing_window_));
- }
+ if (IsPluginProcess() && proxy->channel()) {
+ msg->set_pump_messages_event(
+ proxy->channel()->GetModalDialogEvent(containing_window));
}
scoped_refptr<NPChannelBase> channel(proxy->channel_);
« no previous file with comments | « content/common/np_channel_base.cc ('k') | content/plugin/plugin_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698