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

Side by Side Diff: Source/core/html/HTMLMediaElement.h

Issue 137883009: Remove HTMLMediaElement::pageConsentRequiredForLoad() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 virtual bool isMediaElement() const OVERRIDE FINAL { return true; } 296 virtual bool isMediaElement() const OVERRIDE FINAL { return true; }
297 297
298 void setControllerInternal(PassRefPtr<MediaController>); 298 void setControllerInternal(PassRefPtr<MediaController>);
299 299
300 // Restrictions to change default behaviors. 300 // Restrictions to change default behaviors.
301 enum BehaviorRestrictionFlags { 301 enum BehaviorRestrictionFlags {
302 NoRestrictions = 0, 302 NoRestrictions = 0,
303 RequireUserGestureForPlayRestriction = 1 << 0, 303 RequireUserGestureForPlayRestriction = 1 << 0,
304 RequireUserGestureForFullscreenRestriction = 1 << 1, 304 RequireUserGestureForFullscreenRestriction = 1 << 1,
305 RequirePageConsentToLoadMediaRestriction = 1 << 2,
306 }; 305 };
307 typedef unsigned BehaviorRestrictions; 306 typedef unsigned BehaviorRestrictions;
308 307
309 bool userGestureRequiredForPlay() const { return m_restrictions & RequireUse rGestureForPlayRestriction; } 308 bool userGestureRequiredForPlay() const { return m_restrictions & RequireUse rGestureForPlayRestriction; }
310 bool userGestureRequiredForFullscreen() const { return m_restrictions & Requ ireUserGestureForFullscreenRestriction; } 309 bool userGestureRequiredForFullscreen() const { return m_restrictions & Requ ireUserGestureForFullscreenRestriction; }
311 bool pageConsentRequiredForLoad() const { return m_restrictions & RequirePag eConsentToLoadMediaRestriction; }
312 310
313 void addBehaviorRestriction(BehaviorRestrictions restriction) { m_restrictio ns |= restriction; } 311 void addBehaviorRestriction(BehaviorRestrictions restriction) { m_restrictio ns |= restriction; }
314 void removeBehaviorRestriction(BehaviorRestrictions restriction) { m_restric tions &= ~restriction; } 312 void removeBehaviorRestriction(BehaviorRestrictions restriction) { m_restric tions &= ~restriction; }
315 313
316 bool ignoreTrackDisplayUpdateRequests() const { return m_ignoreTrackDisplayU pdate > 0; } 314 bool ignoreTrackDisplayUpdateRequests() const { return m_ignoreTrackDisplayU pdate > 0; }
317 void beginIgnoringTrackDisplayUpdateRequests(); 315 void beginIgnoringTrackDisplayUpdateRequests();
318 void endIgnoringTrackDisplayUpdateRequests(); 316 void endIgnoringTrackDisplayUpdateRequests();
319 317
320 private: 318 private:
321 void createMediaPlayer(); 319 void createMediaPlayer();
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 inline bool isHTMLMediaElement(const Node& node) 593 inline bool isHTMLMediaElement(const Node& node)
596 { 594 {
597 return node.isElementNode() && toElement(node).isMediaElement(); 595 return node.isElementNode() && toElement(node).isMediaElement();
598 } 596 }
599 597
600 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 598 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
601 599
602 } //namespace 600 } //namespace
603 601
604 #endif 602 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698