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

Side by Side Diff: chrome/plugin/webplugin_proxy.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/webplugin_delegate_stub.cc ('k') | chrome/plugin/webplugin_proxy.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 #ifndef CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__ 5 #ifndef CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__
6 #define CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__ 6 #define CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
11 #include "base/ref_counted.h" 11 #include "base/ref_counted.h"
12 #include "base/scoped_handle.h" 12 #include "base/scoped_handle.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "base/shared_memory.h" 14 #include "base/shared_memory.h"
15 #include "base/timer.h" 15 #include "base/timer.h"
16 #include "chrome/common/ipc_message.h" 16 #include "chrome/common/ipc_message.h"
17 #include "chrome/common/chrome_plugin_api.h" 17 #include "chrome/common/chrome_plugin_api.h"
18 #include "chrome/common/transport_dib.h" 18 #include "chrome/common/transport_dib.h"
19 #include "googleurl/src/gurl.h"
19 #include "webkit/glue/webplugin.h" 20 #include "webkit/glue/webplugin.h"
20 21
21 namespace base { 22 namespace base {
22 class WaitableEvent; 23 class WaitableEvent;
23 } 24 }
24 25
25 class PluginChannel; 26 class PluginChannel;
26 class WebPluginDelegate; 27 class WebPluginDelegate;
27 28
28 // This is an implementation of WebPlugin that proxies all calls to the 29 // This is an implementation of WebPlugin that proxies all calls to the
29 // renderer. 30 // renderer.
30 class WebPluginProxy : public WebPlugin { 31 class WebPluginProxy : public WebPlugin {
31 public: 32 public:
32 // Creates a new proxy for WebPlugin, using the given sender to send the 33 // Creates a new proxy for WebPlugin, using the given sender to send the
33 // marshalled WebPlugin calls. 34 // marshalled WebPlugin calls.
34 WebPluginProxy(PluginChannel* channel, 35 WebPluginProxy(PluginChannel* channel,
35 int route_id, 36 int route_id,
36 WebPluginDelegate* delegate); 37 WebPluginDelegate* delegate,
38 const GURL& page_url);
37 ~WebPluginProxy(); 39 ~WebPluginProxy();
38 40
39 // WebPlugin overrides 41 // WebPlugin overrides
40 #if defined(OS_LINUX) 42 #if defined(OS_LINUX)
41 gfx::PluginWindowHandle CreatePluginContainer(); 43 gfx::PluginWindowHandle CreatePluginContainer();
42 #endif 44 #endif
43 void SetWindow(gfx::PluginWindowHandle window); 45 void SetWindow(gfx::PluginWindowHandle window);
44 void WillDestroyWindow(gfx::PluginWindowHandle window); 46 void WillDestroyWindow(gfx::PluginWindowHandle window);
45 #if defined(OS_WIN) 47 #if defined(OS_WIN)
46 void SetWindowlessPumpEvent(HANDLE pump_messages_event); 48 void SetWindowlessPumpEvent(HANDLE pump_messages_event);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 151
150 scoped_refptr<PluginChannel> channel_; 152 scoped_refptr<PluginChannel> channel_;
151 int route_id_; 153 int route_id_;
152 uint32 cp_browsing_context_; 154 uint32 cp_browsing_context_;
153 NPObject* window_npobject_; 155 NPObject* window_npobject_;
154 NPObject* plugin_element_; 156 NPObject* plugin_element_;
155 WebPluginDelegate* delegate_; 157 WebPluginDelegate* delegate_;
156 gfx::Rect damaged_rect_; 158 gfx::Rect damaged_rect_;
157 bool waiting_for_paint_; 159 bool waiting_for_paint_;
158 scoped_ptr<base::WaitableEvent> modal_dialog_event_; 160 scoped_ptr<base::WaitableEvent> modal_dialog_event_;
161 // The url of the main frame hosting the plugin.
162 GURL page_url_;
159 163
160 #if defined(OS_WIN) 164 #if defined(OS_WIN)
161 // Variables used for desynchronized windowless plugin painting. See note in 165 // Variables used for desynchronized windowless plugin painting. See note in
162 // webplugin_delegate_proxy.h for how this works. 166 // webplugin_delegate_proxy.h for how this works.
163 167
164 // These hold the bitmap where the plugin draws. 168 // These hold the bitmap where the plugin draws.
165 ScopedHandle windowless_shared_section_; 169 ScopedHandle windowless_shared_section_;
166 ScopedBitmap windowless_bitmap_; 170 ScopedBitmap windowless_bitmap_;
167 ScopedHDC windowless_hdc_; 171 ScopedHDC windowless_hdc_;
168 172
169 // These hold the bitmap of the background image. 173 // These hold the bitmap of the background image.
170 ScopedHandle background_shared_section_; 174 ScopedHandle background_shared_section_;
171 ScopedBitmap background_bitmap_; 175 ScopedBitmap background_bitmap_;
172 ScopedHDC background_hdc_; 176 ScopedHDC background_hdc_;
173 #endif 177 #endif
174 178
175 ScopedRunnableMethodFactory<WebPluginProxy> runnable_method_factory_; 179 ScopedRunnableMethodFactory<WebPluginProxy> runnable_method_factory_;
176 }; 180 };
177 181
178 #endif // CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__ 182 #endif // CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__
OLDNEW
« no previous file with comments | « chrome/plugin/webplugin_delegate_stub.cc ('k') | chrome/plugin/webplugin_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698