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

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

Issue 1853543002: Add -ifsameorigin to autoplay experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@autoplay
Patch Set: comment. Created 4 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 reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 return m_element->shouldAutoplay(RecordMetricsBehavior::DoNotRecord); 310 return m_element->shouldAutoplay(RecordMetricsBehavior::DoNotRecord);
311 } 311 }
312 bool isHTMLVideoElement() const override { return m_element->isHTMLVideoElem ent(); } 312 bool isHTMLVideoElement() const override { return m_element->isHTMLVideoElem ent(); }
313 bool isHTMLAudioElement() const override { return m_element->isHTMLAudioElem ent(); } 313 bool isHTMLAudioElement() const override { return m_element->isHTMLAudioElem ent(); }
314 314
315 // Document 315 // Document
316 bool isLegacyViewportType() override; 316 bool isLegacyViewportType() override;
317 PageVisibilityState pageVisibilityState() const override; 317 PageVisibilityState pageVisibilityState() const override;
318 String autoplayExperimentMode() const override; 318 String autoplayExperimentMode() const override;
319 319
320 // Frame
321 bool isCrossOrigin() const override
322 {
323 const Frame* frame = m_element->document().frame();
324 return frame && frame->isCrossOrigin();
325 }
326
320 // LayoutObject 327 // LayoutObject
321 void setRequestPositionUpdates(bool) override; 328 void setRequestPositionUpdates(bool) override;
322 IntRect absoluteBoundingBoxRect() const override; 329 IntRect absoluteBoundingBoxRect() const override;
323 330
324 DEFINE_INLINE_VIRTUAL_TRACE() 331 DEFINE_INLINE_VIRTUAL_TRACE()
325 { 332 {
326 visitor->trace(m_element); 333 visitor->trace(m_element);
327 Client::trace(visitor); 334 Client::trace(visitor);
328 } 335 }
329 336
(...skipping 3509 matching lines...) Expand 10 before | Expand all | Expand 10 after
3839 3846
3840 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co nst 3847 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co nst
3841 { 3848 {
3842 IntRect result; 3849 IntRect result;
3843 if (LayoutObject* object = m_element->layoutObject()) 3850 if (LayoutObject* object = m_element->layoutObject())
3844 result = object->absoluteBoundingBoxRect(); 3851 result = object->absoluteBoundingBoxRect();
3845 return result; 3852 return result;
3846 } 3853 }
3847 3854
3848 } // namespace blink 3855 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698