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

Side by Side Diff: content/plugin/webplugin_proxy.cc

Issue 1426923007: Remove PluginLoadObserver and related logic, it was only used for NPAPI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/plugin/webplugin_proxy.h" 5 #include "content/plugin/webplugin_proxy.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 WebPluginResourceClient* client) { 268 WebPluginResourceClient* client) {
269 DCHECK(resource_clients_.find(resource_id) == resource_clients_.end()); 269 DCHECK(resource_clients_.find(resource_id) == resource_clients_.end());
270 resource_clients_[resource_id] = client; 270 resource_clients_[resource_id] = client;
271 } 271 }
272 272
273 void WebPluginProxy::HandleURLRequest(const char* url, 273 void WebPluginProxy::HandleURLRequest(const char* url,
274 const char* method, 274 const char* method,
275 const char* target, 275 const char* target,
276 const char* buf, 276 const char* buf,
277 unsigned int len, 277 unsigned int len,
278 int notify_id,
279 bool popups_allowed, 278 bool popups_allowed,
280 bool notify_redirects) { 279 bool notify_redirects) {
281 if (!target && base::EqualsCaseInsensitiveASCII(method, "GET")) { 280 if (!target && base::EqualsCaseInsensitiveASCII(method, "GET")) {
282 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082 281 // Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082
283 // for more details on this. 282 // for more details on this.
284 if (delegate_->GetQuirks() & 283 if (delegate_->GetQuirks() &
285 WebPluginDelegateImpl::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) { 284 WebPluginDelegateImpl::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) {
286 GURL request_url(url); 285 GURL request_url(url);
287 if (!request_url.SchemeIs(url::kHttpScheme) && 286 if (!request_url.SchemeIs(url::kHttpScheme) &&
288 !request_url.SchemeIs(url::kHttpsScheme) && 287 !request_url.SchemeIs(url::kHttpsScheme) &&
289 !request_url.SchemeIs(url::kFtpScheme)) { 288 !request_url.SchemeIs(url::kFtpScheme)) {
290 return; 289 return;
291 } 290 }
292 } 291 }
293 } 292 }
294 293
295 PluginHostMsg_URLRequest_Params params; 294 PluginHostMsg_URLRequest_Params params;
296 params.url = url; 295 params.url = url;
297 params.method = method; 296 params.method = method;
298 if (target) 297 if (target)
299 params.target = std::string(target); 298 params.target = std::string(target);
300 299
301 if (len) { 300 if (len) {
302 params.buffer.resize(len); 301 params.buffer.resize(len);
303 memcpy(&params.buffer.front(), buf, len); 302 memcpy(&params.buffer.front(), buf, len);
304 } 303 }
305 304
306 params.notify_id = notify_id;
307 params.popups_allowed = popups_allowed; 305 params.popups_allowed = popups_allowed;
308 params.notify_redirects = notify_redirects; 306 params.notify_redirects = notify_redirects;
309 307
310 Send(new PluginHostMsg_URLRequest(route_id_, params)); 308 Send(new PluginHostMsg_URLRequest(route_id_, params));
311 } 309 }
312 310
313 void WebPluginProxy::Paint(const gfx::Rect& rect) { 311 void WebPluginProxy::Paint(const gfx::Rect& rect) {
314 #if defined(OS_MACOSX) 312 #if defined(OS_MACOSX)
315 if (!windowless_context()) 313 if (!windowless_context())
316 return; 314 return;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 int input_type; 602 int input_type;
605 gfx::Rect caret_rect; 603 gfx::Rect caret_rect;
606 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) 604 if (!delegate_->GetIMEStatus(&input_type, &caret_rect))
607 return; 605 return;
608 606
609 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); 607 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect));
610 } 608 }
611 #endif 609 #endif
612 610
613 } // namespace content 611 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698