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

Side by Side Diff: chrome/plugin/npobject_stub.h

Issue 155238: Add the page url to plugin crashes to aid debugging. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/plugin/npobject_proxy.cc ('k') | chrome/plugin/npobject_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // A class that receives IPC messages from an NPObjectProxy and calls the real 5 // A class that receives IPC messages from an NPObjectProxy and calls the real
6 // NPObject. 6 // NPObject.
7 7
8 #ifndef CHROME_PLUGIN_NPOBJECT_STUB_H_ 8 #ifndef CHROME_PLUGIN_NPOBJECT_STUB_H_
9 #define CHROME_PLUGIN_NPOBJECT_STUB_H_ 9 #define CHROME_PLUGIN_NPOBJECT_STUB_H_
10 10
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/ref_counted.h" 13 #include "base/ref_counted.h"
14 #include "chrome/common/ipc_channel.h" 14 #include "chrome/common/ipc_channel.h"
15 #include "googleurl/src/gurl.h"
15 16
16 namespace base { 17 namespace base {
17 class WaitableEvent; 18 class WaitableEvent;
18 } 19 }
19 20
20 class PluginChannelBase; 21 class PluginChannelBase;
21 class WebPluginDelegateProxy; 22 class WebPluginDelegateProxy;
22 struct NPIdentifier_Param; 23 struct NPIdentifier_Param;
23 struct NPObject; 24 struct NPObject;
24 struct NPVariant_Param; 25 struct NPVariant_Param;
25 26
26 // This wraps an NPObject and converts IPC messages from NPObjectProxy to calls 27 // This wraps an NPObject and converts IPC messages from NPObjectProxy to calls
27 // to the object. The results are marshalled back. See npobject_proxy.h for 28 // to the object. The results are marshalled back. See npobject_proxy.h for
28 // more information. 29 // more information.
29 class NPObjectStub : public IPC::Channel::Listener, 30 class NPObjectStub : public IPC::Channel::Listener,
30 public IPC::Message::Sender { 31 public IPC::Message::Sender {
31 public: 32 public:
32 NPObjectStub(NPObject* npobject, 33 NPObjectStub(NPObject* npobject,
33 PluginChannelBase* channel, 34 PluginChannelBase* channel,
34 int route_id, 35 int route_id,
35 base::WaitableEvent* modal_dialog_event); 36 base::WaitableEvent* modal_dialog_event,
37 const GURL& page_url);
36 ~NPObjectStub(); 38 ~NPObjectStub();
37 39
38 // IPC::Message::Sender implementation: 40 // IPC::Message::Sender implementation:
39 bool Send(IPC::Message* msg); 41 bool Send(IPC::Message* msg);
40 42
41 // Called when the plugin widget that this NPObject came from is destroyed. 43 // Called when the plugin widget that this NPObject came from is destroyed.
42 // This is needed because the renderer calls NPN_DeallocateObject on the 44 // This is needed because the renderer calls NPN_DeallocateObject on the
43 // window script object on destruction to avoid leaks. 45 // window script object on destruction to avoid leaks.
44 void set_invalid() { valid_ = false; } 46 void set_invalid() { valid_ = false; }
45 void set_proxy(WebPluginDelegateProxy* proxy) { 47 void set_proxy(WebPluginDelegateProxy* proxy) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 scoped_refptr<PluginChannelBase> channel_; 85 scoped_refptr<PluginChannelBase> channel_;
84 int route_id_; 86 int route_id_;
85 87
86 // These variables are used to ensure that the window script object is not 88 // These variables are used to ensure that the window script object is not
87 // called after the plugin widget has gone away, as the frame manually 89 // called after the plugin widget has gone away, as the frame manually
88 // deallocates it and ignores the refcount to avoid leaks. 90 // deallocates it and ignores the refcount to avoid leaks.
89 bool valid_; 91 bool valid_;
90 WebPluginDelegateProxy* web_plugin_delegate_proxy_; 92 WebPluginDelegateProxy* web_plugin_delegate_proxy_;
91 93
92 base::WaitableEvent* modal_dialog_event_; 94 base::WaitableEvent* modal_dialog_event_;
95
96 // The url of the main frame hosting the plugin.
97 GURL page_url_;
93 }; 98 };
94 99
95 #endif // CHROME_PLUGIN_NPOBJECT_STUB_H_ 100 #endif // CHROME_PLUGIN_NPOBJECT_STUB_H_
OLDNEW
« no previous file with comments | « chrome/plugin/npobject_proxy.cc ('k') | chrome/plugin/npobject_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698