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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2842253002: Move ReportLocalLoadFailed to ExecutionContext (Closed)
Patch Set: Created 3 years, 7 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 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 if (!url.IsValid()) { 1413 if (!url.IsValid()) {
1414 BLINK_MEDIA_LOG << "isSafeToLoadURL(" << (void*)this << ", " 1414 BLINK_MEDIA_LOG << "isSafeToLoadURL(" << (void*)this << ", "
1415 << UrlForLoggingMedia(url) 1415 << UrlForLoggingMedia(url)
1416 << ") -> FALSE because url is invalid"; 1416 << ") -> FALSE because url is invalid";
1417 return false; 1417 return false;
1418 } 1418 }
1419 1419
1420 LocalFrame* frame = GetDocument().GetFrame(); 1420 LocalFrame* frame = GetDocument().GetFrame();
1421 if (!frame || !GetDocument().GetSecurityOrigin()->CanDisplay(url)) { 1421 if (!frame || !GetDocument().GetSecurityOrigin()->CanDisplay(url)) {
1422 if (action_if_invalid == kComplain) 1422 if (action_if_invalid == kComplain)
1423 FrameLoader::ReportLocalLoadFailed(frame, url.ElidedString()); 1423 GetDocument().ReportLocalLoadFailed(url.ElidedString());
1424 BLINK_MEDIA_LOG << "isSafeToLoadURL(" << (void*)this << ", " 1424 BLINK_MEDIA_LOG << "isSafeToLoadURL(" << (void*)this << ", "
1425 << UrlForLoggingMedia(url) 1425 << UrlForLoggingMedia(url)
1426 << ") -> FALSE rejected by SecurityOrigin"; 1426 << ") -> FALSE rejected by SecurityOrigin";
1427 return false; 1427 return false;
1428 } 1428 }
1429 1429
1430 if (!GetDocument().GetContentSecurityPolicy()->AllowMediaFromSource(url)) { 1430 if (!GetDocument().GetContentSecurityPolicy()->AllowMediaFromSource(url)) {
1431 BLINK_MEDIA_LOG << "isSafeToLoadURL(" << (void*)this << ", " 1431 BLINK_MEDIA_LOG << "isSafeToLoadURL(" << (void*)this << ", "
1432 << UrlForLoggingMedia(url) 1432 << UrlForLoggingMedia(url)
1433 << ") -> rejected by Content Security Policy"; 1433 << ") -> rejected by Content Security Policy";
(...skipping 2682 matching lines...) Expand 10 before | Expand all | Expand 10 after
4116 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); 4116 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE);
4117 } 4117 }
4118 4118
4119 void HTMLMediaElement::ViewportFillDebouncerTimerFired(TimerBase*) { 4119 void HTMLMediaElement::ViewportFillDebouncerTimerFired(TimerBase*) {
4120 mostly_filling_viewport_ = true; 4120 mostly_filling_viewport_ = true;
4121 if (web_media_player_) 4121 if (web_media_player_)
4122 web_media_player_->BecameDominantVisibleContent(mostly_filling_viewport_); 4122 web_media_player_->BecameDominantVisibleContent(mostly_filling_viewport_);
4123 } 4123 }
4124 4124
4125 } // namespace blink 4125 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698