OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/renderer/webplugin_delegate_proxy.h" | 5 #include "content/renderer/webplugin_delegate_proxy.h" |
6 | 6 |
7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "content/renderer/gpu/command_buffer_proxy.h" | 29 #include "content/renderer/gpu/command_buffer_proxy.h" |
30 #include "content/renderer/content_renderer_client.h" | 30 #include "content/renderer/content_renderer_client.h" |
31 #include "content/renderer/plugin_channel_host.h" | 31 #include "content/renderer/plugin_channel_host.h" |
32 #include "content/renderer/render_thread.h" | 32 #include "content/renderer/render_thread.h" |
33 #include "content/renderer/render_view.h" | 33 #include "content/renderer/render_view.h" |
34 #include "ipc/ipc_channel_handle.h" | 34 #include "ipc/ipc_channel_handle.h" |
35 #include "net/base/mime_util.h" | 35 #include "net/base/mime_util.h" |
36 #include "skia/ext/platform_canvas.h" | 36 #include "skia/ext/platform_canvas.h" |
37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" | 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" |
38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" | 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" |
| 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragData.h" | 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragData.h" |
40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
43 #include "ui/gfx/blit.h" | 44 #include "ui/gfx/blit.h" |
44 #include "ui/gfx/canvas_skia.h" | 45 #include "ui/gfx/canvas_skia.h" |
45 #include "ui/gfx/native_widget_types.h" | 46 #include "ui/gfx/native_widget_types.h" |
46 #include "ui/gfx/size.h" | 47 #include "ui/gfx/size.h" |
47 #include "webkit/plugins/npapi/plugin_group.h" | 48 #include "webkit/plugins/npapi/plugin_group.h" |
48 #include "webkit/plugins/npapi/webplugin.h" | 49 #include "webkit/plugins/npapi/webplugin.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 : render_view_(render_view), | 176 : render_view_(render_view), |
176 plugin_(NULL), | 177 plugin_(NULL), |
177 uses_shared_bitmaps_(false), | 178 uses_shared_bitmaps_(false), |
178 window_(gfx::kNullPluginWindow), | 179 window_(gfx::kNullPluginWindow), |
179 mime_type_(mime_type), | 180 mime_type_(mime_type), |
180 instance_id_(MSG_ROUTING_NONE), | 181 instance_id_(MSG_ROUTING_NONE), |
181 npobject_(NULL), | 182 npobject_(NULL), |
182 sad_plugin_(NULL), | 183 sad_plugin_(NULL), |
183 invalidate_pending_(false), | 184 invalidate_pending_(false), |
184 transparent_(false), | 185 transparent_(false), |
185 page_url_(render_view_->webview()->mainFrame()->url()) { | 186 page_url_(render_view_->webview()->mainFrame()->document().url()) { |
186 } | 187 } |
187 | 188 |
188 WebPluginDelegateProxy::~WebPluginDelegateProxy() { | 189 WebPluginDelegateProxy::~WebPluginDelegateProxy() { |
189 #if defined(OS_MACOSX) | 190 #if defined(OS_MACOSX) |
190 // Ask the browser to release old TransportDIB objects for which no | 191 // Ask the browser to release old TransportDIB objects for which no |
191 // PluginHostMsg_UpdateGeometry_ACK was ever received from the plugin | 192 // PluginHostMsg_UpdateGeometry_ACK was ever received from the plugin |
192 // process. | 193 // process. |
193 for (OldTransportDIBMap::iterator iterator = old_transport_dibs_.begin(); | 194 for (OldTransportDIBMap::iterator iterator = old_transport_dibs_.begin(); |
194 iterator != old_transport_dibs_.end(); | 195 iterator != old_transport_dibs_.end(); |
195 ++iterator) { | 196 ++iterator) { |
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1370 } | 1371 } |
1371 #endif | 1372 #endif |
1372 | 1373 |
1373 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, | 1374 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, |
1374 int resource_id) { | 1375 int resource_id) { |
1375 if (!plugin_) | 1376 if (!plugin_) |
1376 return; | 1377 return; |
1377 | 1378 |
1378 plugin_->URLRedirectResponse(allow, resource_id); | 1379 plugin_->URLRedirectResponse(allow, resource_id); |
1379 } | 1380 } |
OLD | NEW |