| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/renderer/webplugin_delegate_proxy.h" | 5 #include "chrome/renderer/webplugin_delegate_proxy.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/gfx/blit.h" | 9 #include "app/gfx/blit.h" |
| 10 #include "app/gfx/canvas.h" | 10 #include "app/gfx/canvas.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "grit/generated_resources.h" | 28 #include "grit/generated_resources.h" |
| 29 #include "grit/renderer_resources.h" | 29 #include "grit/renderer_resources.h" |
| 30 #include "net/base/mime_util.h" | 30 #include "net/base/mime_util.h" |
| 31 #include "printing/native_metafile.h" | 31 #include "printing/native_metafile.h" |
| 32 #include "webkit/api/public/WebBindings.h" | 32 #include "webkit/api/public/WebBindings.h" |
| 33 #include "webkit/api/public/WebCursorInfo.h" | 33 #include "webkit/api/public/WebCursorInfo.h" |
| 34 #include "webkit/api/public/WebDragData.h" | 34 #include "webkit/api/public/WebDragData.h" |
| 35 #include "webkit/api/public/WebFrame.h" | 35 #include "webkit/api/public/WebFrame.h" |
| 36 #include "webkit/api/public/WebString.h" | 36 #include "webkit/api/public/WebString.h" |
| 37 #include "webkit/api/public/WebVector.h" | 37 #include "webkit/api/public/WebVector.h" |
| 38 #include "webkit/api/public/WebView.h" |
| 38 #include "webkit/glue/webkit_glue.h" | 39 #include "webkit/glue/webkit_glue.h" |
| 39 #include "webkit/glue/webplugin.h" | 40 #include "webkit/glue/webplugin.h" |
| 40 #include "webkit/glue/webview.h" | |
| 41 | 41 |
| 42 #if defined(OS_POSIX) | 42 #if defined(OS_POSIX) |
| 43 #include "ipc/ipc_channel_posix.h" | 43 #include "ipc/ipc_channel_posix.h" |
| 44 #endif | 44 #endif |
| 45 | 45 |
| 46 #if defined(OS_MACOSX) | 46 #if defined(OS_MACOSX) |
| 47 #include "base/scoped_cftyperef.h" | 47 #include "base/scoped_cftyperef.h" |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 using WebKit::WebBindings; | 50 using WebKit::WebBindings; |
| 51 using WebKit::WebCursorInfo; | 51 using WebKit::WebCursorInfo; |
| 52 using WebKit::WebDragData; |
| 52 using WebKit::WebInputEvent; | 53 using WebKit::WebInputEvent; |
| 53 using WebKit::WebDragData; | 54 using WebKit::WebString; |
| 54 using WebKit::WebVector; | 55 using WebKit::WebVector; |
| 55 using WebKit::WebString; | 56 using WebKit::WebView; |
| 56 | 57 |
| 57 // Proxy for WebPluginResourceClient. The object owns itself after creation, | 58 // Proxy for WebPluginResourceClient. The object owns itself after creation, |
| 58 // deleting itself after its callback has been called. | 59 // deleting itself after its callback has been called. |
| 59 class ResourceClientProxy : public webkit_glue::WebPluginResourceClient { | 60 class ResourceClientProxy : public webkit_glue::WebPluginResourceClient { |
| 60 public: | 61 public: |
| 61 ResourceClientProxy(PluginChannelHost* channel, int instance_id) | 62 ResourceClientProxy(PluginChannelHost* channel, int instance_id) |
| 62 : channel_(channel), instance_id_(instance_id), resource_id_(0), | 63 : channel_(channel), instance_id_(instance_id), resource_id_(0), |
| 63 notify_needed_(false), notify_data_(0), | 64 notify_needed_(false), notify_data_(0), |
| 64 multibyte_response_expected_(false) { | 65 multibyte_response_expected_(false) { |
| 65 } | 66 } |
| (...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 intptr_t existing_stream, bool notify_needed, intptr_t notify_data) { | 1055 intptr_t existing_stream, bool notify_needed, intptr_t notify_data) { |
| 1055 plugin_->InitiateHTTPRangeRequest(url.c_str(), range_info.c_str(), | 1056 plugin_->InitiateHTTPRangeRequest(url.c_str(), range_info.c_str(), |
| 1056 existing_stream, notify_needed, | 1057 existing_stream, notify_needed, |
| 1057 notify_data); | 1058 notify_data); |
| 1058 } | 1059 } |
| 1059 | 1060 |
| 1060 void WebPluginDelegateProxy::OnDeferResourceLoading(int resource_id, | 1061 void WebPluginDelegateProxy::OnDeferResourceLoading(int resource_id, |
| 1061 bool defer) { | 1062 bool defer) { |
| 1062 plugin_->SetDeferResourceLoading(resource_id, defer); | 1063 plugin_->SetDeferResourceLoading(resource_id, defer); |
| 1063 } | 1064 } |
| OLD | NEW |