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

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 2907663004: FrameTree::Find only searches relative to local frames. (Closed)
Patch Set: Rebasing... Created 3 years, 6 months 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/renderer/pepper/pepper_plugin_instance_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bit_cast.h" 10 #include "base/bit_cast.h"
(...skipping 3247 matching lines...) Expand 10 before | Expand all | Expand 10 after
3258 } 3258 }
3259 web_request.SetFirstPartyForCookies(document.FirstPartyForCookies()); 3259 web_request.SetFirstPartyForCookies(document.FirstPartyForCookies());
3260 if (IsProcessingUserGesture()) 3260 if (IsProcessingUserGesture())
3261 web_request.SetHasUserGesture(true); 3261 web_request.SetHasUserGesture(true);
3262 3262
3263 GURL gurl(web_request.Url()); 3263 GURL gurl(web_request.Url());
3264 if (gurl.SchemeIs(url::kJavaScriptScheme)) { 3264 if (gurl.SchemeIs(url::kJavaScriptScheme)) {
3265 // In imitation of the NPAPI implementation, only |target_frame == frame| is 3265 // In imitation of the NPAPI implementation, only |target_frame == frame| is
3266 // allowed for security reasons. 3266 // allowed for security reasons.
3267 WebFrame* target_frame = 3267 WebFrame* target_frame =
3268 frame->View()->FindFrameByName(WebString::FromUTF8(target), frame); 3268 frame->FindFrameByName(WebString::FromUTF8(target));
3269 if (target_frame != frame) 3269 if (target_frame != frame)
3270 return PP_ERROR_NOACCESS; 3270 return PP_ERROR_NOACCESS;
3271 3271
3272 // TODO(viettrungluu): NPAPI sends the result back to the plugin -- do we 3272 // TODO(viettrungluu): NPAPI sends the result back to the plugin -- do we
3273 // need that? 3273 // need that?
3274 blink::WebScopedUserGesture user_gesture(CurrentUserGestureToken()); 3274 blink::WebScopedUserGesture user_gesture(CurrentUserGestureToken());
3275 WebString result = container_->ExecuteScriptURL(gurl, false); 3275 WebString result = container_->ExecuteScriptURL(gurl, false);
3276 return result.IsNull() ? PP_ERROR_FAILED : PP_OK; 3276 return result.IsNull() ? PP_ERROR_FAILED : PP_OK;
3277 } 3277 }
3278 3278
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
3490 const cc::TextureMailbox& mailbox) const { 3490 const cc::TextureMailbox& mailbox) const {
3491 auto it = 3491 auto it =
3492 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), 3492 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(),
3493 [&mailbox](const TextureMailboxRefCount& ref_count) { 3493 [&mailbox](const TextureMailboxRefCount& ref_count) {
3494 return ref_count.first.mailbox() == mailbox.mailbox(); 3494 return ref_count.first.mailbox() == mailbox.mailbox();
3495 }); 3495 });
3496 return it != texture_ref_counts_.end(); 3496 return it != texture_ref_counts_.end();
3497 } 3497 }
3498 3498
3499 } // namespace content 3499 } // namespace content
OLDNEW
« no previous file with comments | « components/printing/test/print_web_view_helper_browsertest.cc ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698