OLD | NEW |
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 #include "chrome/renderer/webplugin_delegate_proxy.h" | 5 #include "chrome/renderer/webplugin_delegate_proxy.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 | 8 |
9 #include "generated_resources.h" | 9 #include "generated_resources.h" |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/ref_counted.h" | 12 #include "base/ref_counted.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "base/gfx/size.h" | 14 #include "base/gfx/size.h" |
| 15 #include "base/gfx/native_widget_types.h" |
15 | 16 |
16 #include "chrome/app/chrome_dll_resource.h" | 17 #include "chrome/app/chrome_dll_resource.h" |
17 #include "chrome/common/gfx/chrome_canvas.h" | 18 #include "chrome/common/gfx/chrome_canvas.h" |
18 #include "chrome/common/gfx/emf.h" | 19 #include "chrome/common/gfx/emf.h" |
19 #include "chrome/common/l10n_util.h" | 20 #include "chrome/common/l10n_util.h" |
20 #include "chrome/common/resource_bundle.h" | 21 #include "chrome/common/resource_bundle.h" |
21 #include "chrome/common/win_util.h" | 22 #include "chrome/common/win_util.h" |
22 #include "chrome/plugin/npobject_proxy.h" | 23 #include "chrome/plugin/npobject_proxy.h" |
23 #include "chrome/plugin/npobject_stub.h" | 24 #include "chrome/plugin/npobject_stub.h" |
24 #include "chrome/renderer/render_thread.h" | 25 #include "chrome/renderer/render_thread.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 return false; | 225 return false; |
225 | 226 |
226 plugin_path_ = plugin_path; | 227 plugin_path_ = plugin_path; |
227 channel_host_ = channel_host; | 228 channel_host_ = channel_host; |
228 instance_id_ = instance_id; | 229 instance_id_ = instance_id; |
229 | 230 |
230 channel_host_->AddRoute(instance_id_, this, false); | 231 channel_host_->AddRoute(instance_id_, this, false); |
231 | 232 |
232 // Now tell the PluginInstance in the plugin process to initialize. | 233 // Now tell the PluginInstance in the plugin process to initialize. |
233 PluginMsg_Init_Params params; | 234 PluginMsg_Init_Params params; |
234 params.containing_window = render_view_->host_window(); | 235 params.containing_window = gfx::NativeViewFromId(render_view_->host_window()); |
235 params.url = url; | 236 params.url = url; |
236 for (int i = 0; i < argc; ++i) { | 237 for (int i = 0; i < argc; ++i) { |
237 params.arg_names.push_back(argn[i]); | 238 params.arg_names.push_back(argn[i]); |
238 params.arg_values.push_back(argv[i]); | 239 params.arg_values.push_back(argv[i]); |
239 | 240 |
240 if (LowerCaseEqualsASCII(params.arg_names.back(), "wmode") && | 241 if (LowerCaseEqualsASCII(params.arg_names.back(), "wmode") && |
241 LowerCaseEqualsASCII(params.arg_values.back(), "transparent")) { | 242 LowerCaseEqualsASCII(params.arg_values.back(), "transparent")) { |
242 transparent_ = true; | 243 transparent_ = true; |
243 } | 244 } |
244 } | 245 } |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 plugin_->CancelDocumentLoad(); | 746 plugin_->CancelDocumentLoad(); |
746 } | 747 } |
747 | 748 |
748 void WebPluginDelegateProxy::OnInitiateHTTPRangeRequest( | 749 void WebPluginDelegateProxy::OnInitiateHTTPRangeRequest( |
749 const std::string& url, const std::string& range_info, | 750 const std::string& url, const std::string& range_info, |
750 HANDLE existing_stream, bool notify_needed, HANDLE notify_data) { | 751 HANDLE existing_stream, bool notify_needed, HANDLE notify_data) { |
751 plugin_->InitiateHTTPRangeRequest(url.c_str(), range_info.c_str(), | 752 plugin_->InitiateHTTPRangeRequest(url.c_str(), range_info.c_str(), |
752 existing_stream, notify_needed, | 753 existing_stream, notify_needed, |
753 notify_data); | 754 notify_data); |
754 } | 755 } |
OLD | NEW |