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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 10886047: Pepper: Add a X-Requested-With header to URL requests done for Pepper plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: foo Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppapi_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 return PP_ERROR_FAILED; 1530 return PP_ERROR_FAILED;
1531 1531
1532 WebDocument document = container_->element().document(); 1532 WebDocument document = container_->element().document();
1533 WebFrame* frame = document.frame(); 1533 WebFrame* frame = document.frame();
1534 if (!frame) 1534 if (!frame)
1535 return PP_ERROR_FAILED; 1535 return PP_ERROR_FAILED;
1536 1536
1537 ::ppapi::URLRequestInfoData completed_request = request; 1537 ::ppapi::URLRequestInfoData completed_request = request;
1538 1538
1539 WebURLRequest web_request; 1539 WebURLRequest web_request;
1540 if (!CreateWebURLRequest(&completed_request, frame, &web_request)) 1540 if (!CreateWebURLRequest(pp_instance(), &completed_request, frame,
1541 &web_request))
1541 return PP_ERROR_FAILED; 1542 return PP_ERROR_FAILED;
1542 web_request.setFirstPartyForCookies(document.firstPartyForCookies()); 1543 web_request.setFirstPartyForCookies(document.firstPartyForCookies());
1543 web_request.setHasUserGesture(from_user_action); 1544 web_request.setHasUserGesture(from_user_action);
1544 1545
1545 GURL gurl(web_request.url()); 1546 GURL gurl(web_request.url());
1546 if (gurl.SchemeIs("javascript")) { 1547 if (gurl.SchemeIs("javascript")) {
1547 // In imitation of the NPAPI implementation, only |target_frame == frame| is 1548 // In imitation of the NPAPI implementation, only |target_frame == frame| is
1548 // allowed for security reasons. 1549 // allowed for security reasons.
1549 WebFrame* target_frame = 1550 WebFrame* target_frame =
1550 frame->view()->findFrameByName(WebString::fromUTF8(target), frame); 1551 frame->view()->findFrameByName(WebString::fromUTF8(target), frame);
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
2502 screen_size_for_fullscreen_ = gfx::Size(); 2503 screen_size_for_fullscreen_ = gfx::Size();
2503 WebElement element = container_->element(); 2504 WebElement element = container_->element();
2504 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2505 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2505 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2506 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2506 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2507 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2507 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2508 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2508 } 2509 }
2509 2510
2510 } // namespace ppapi 2511 } // namespace ppapi
2511 } // namespace webkit 2512 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppapi_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698