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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
266 params.url = url; | 266 params.url = url; |
267 params.page_url = page_url_; | 267 params.page_url = page_url_; |
268 params.arg_names = arg_names; | 268 params.arg_names = arg_names; |
269 params.arg_values = arg_values; | 269 params.arg_values = arg_values; |
270 for (size_t i = 0; i < arg_names.size(); ++i) { | 270 for (size_t i = 0; i < arg_names.size(); ++i) { |
271 if (LowerCaseEqualsASCII(arg_names[i], "wmode") && | 271 if (LowerCaseEqualsASCII(arg_names[i], "wmode") && |
272 LowerCaseEqualsASCII(arg_values[i], "transparent")) { | 272 LowerCaseEqualsASCII(arg_values[i], "transparent")) { |
273 transparent_ = true; | 273 transparent_ = true; |
274 } | 274 } |
275 } | 275 } |
276 #if defined(OS_MACOSX) | |
277 // Until we have a way to support accelerated (3D) drawing on Macs, ask | |
278 // Flash to use windowless mode so that it use CoreGraphics instead of opening | |
279 // OpenGL contexts overlaying the browser window (which will fail or crash | |
280 // because Mac OS X does not allow that across processes). | |
281 if (!transparent_ && mime_type_ == "application/x-shockwave-flash" ) { | |
darin (slow to review)
2009/10/29 19:54:24
nit: extra space there at the end
Amanda Walker
2009/10/29 20:08:14
Oops, missed that before committing. Will fix.
| |
282 params.arg_names.push_back("wmode"); | |
283 params.arg_values.push_back("opaque"); | |
284 } | |
285 #endif | |
276 params.load_manually = load_manually; | 286 params.load_manually = load_manually; |
277 | 287 |
278 plugin_ = plugin; | 288 plugin_ = plugin; |
279 | 289 |
280 result = false; | 290 result = false; |
281 IPC::Message* msg = new PluginMsg_Init(instance_id_, params, &result); | 291 IPC::Message* msg = new PluginMsg_Init(instance_id_, params, &result); |
282 Send(msg); | 292 Send(msg); |
283 | 293 |
284 return result; | 294 return result; |
285 } | 295 } |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1083 intptr_t existing_stream, bool notify_needed, intptr_t notify_data) { | 1093 intptr_t existing_stream, bool notify_needed, intptr_t notify_data) { |
1084 plugin_->InitiateHTTPRangeRequest(url.c_str(), range_info.c_str(), | 1094 plugin_->InitiateHTTPRangeRequest(url.c_str(), range_info.c_str(), |
1085 existing_stream, notify_needed, | 1095 existing_stream, notify_needed, |
1086 notify_data); | 1096 notify_data); |
1087 } | 1097 } |
1088 | 1098 |
1089 void WebPluginDelegateProxy::OnDeferResourceLoading(int resource_id, | 1099 void WebPluginDelegateProxy::OnDeferResourceLoading(int resource_id, |
1090 bool defer) { | 1100 bool defer) { |
1091 plugin_->SetDeferResourceLoading(resource_id, defer); | 1101 plugin_->SetDeferResourceLoading(resource_id, defer); |
1092 } | 1102 } |
OLD | NEW |