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

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

Issue 2758233003: Fix the conditions when fullscreen detector listeners are registered (Closed)
Patch Set: addressed mlamouri's comments Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLVideoElement.h » ('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 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 protected: 326 protected:
327 HTMLMediaElement(const QualifiedName&, Document&); 327 HTMLMediaElement(const QualifiedName&, Document&);
328 ~HTMLMediaElement() override; 328 ~HTMLMediaElement() override;
329 void dispose(); 329 void dispose();
330 330
331 void parseAttribute(const AttributeModificationParams&) override; 331 void parseAttribute(const AttributeModificationParams&) override;
332 void finishParsingChildren() final; 332 void finishParsingChildren() final;
333 bool isURLAttribute(const Attribute&) const override; 333 bool isURLAttribute(const Attribute&) const override;
334 void attachLayoutTree(const AttachContext& = AttachContext()) override; 334 void attachLayoutTree(const AttachContext& = AttachContext()) override;
335 335
336 InsertionNotificationRequest insertedInto(ContainerNode*) override;
337 void removedFrom(ContainerNode*) override;
338
336 void didMoveToNewDocument(Document& oldDocument) override; 339 void didMoveToNewDocument(Document& oldDocument) override;
337 virtual KURL posterImageURL() const { return KURL(); } 340 virtual KURL posterImageURL() const { return KURL(); }
338 341
339 enum DisplayMode { Unknown, Poster, Video }; 342 enum DisplayMode { Unknown, Poster, Video };
340 DisplayMode getDisplayMode() const { return m_displayMode; } 343 DisplayMode getDisplayMode() const { return m_displayMode; }
341 virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; } 344 virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; }
342 345
343 private: 346 private:
344 // Friend class for testing. 347 // Friend class for testing.
345 friend class MediaElementFillingViewportTest; 348 friend class MediaElementFillingViewportTest;
346 349
347 void resetMediaPlayerAndMediaSource(); 350 void resetMediaPlayerAndMediaSource();
348 351
349 bool alwaysCreateUserAgentShadowRoot() const final { return true; } 352 bool alwaysCreateUserAgentShadowRoot() const final { return true; }
350 bool areAuthorShadowsAllowed() const final { return false; } 353 bool areAuthorShadowsAllowed() const final { return false; }
351 354
352 bool supportsFocus() const final; 355 bool supportsFocus() const final;
353 bool isMouseFocusable() const final; 356 bool isMouseFocusable() const final;
354 bool layoutObjectIsNeeded(const ComputedStyle&) override; 357 bool layoutObjectIsNeeded(const ComputedStyle&) override;
355 LayoutObject* createLayoutObject(const ComputedStyle&) override; 358 LayoutObject* createLayoutObject(const ComputedStyle&) override;
356 InsertionNotificationRequest insertedInto(ContainerNode*) final;
357 void didNotifySubtreeInsertionsToDocument() override; 359 void didNotifySubtreeInsertionsToDocument() override;
358 void removedFrom(ContainerNode*) final;
359 void didRecalcStyle() final; 360 void didRecalcStyle() final;
360 361
361 bool canStartSelection() const override { return false; } 362 bool canStartSelection() const override { return false; }
362 363
363 bool isInteractiveContent() const final; 364 bool isInteractiveContent() const final;
364 365
365 // SuspendableObject functions. 366 // SuspendableObject functions.
366 void contextDestroyed(ExecutionContext*) override; 367 void contextDestroyed(ExecutionContext*) override;
367 368
368 virtual void updateDisplayState() {} 369 virtual void updateDisplayState() {}
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 766
766 inline bool isHTMLMediaElement(const HTMLElement& element) { 767 inline bool isHTMLMediaElement(const HTMLElement& element) {
767 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 768 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
768 } 769 }
769 770
770 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 771 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
771 772
772 } // namespace blink 773 } // namespace blink
773 774
774 #endif // HTMLMediaElement_h 775 #endif // HTMLMediaElement_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLVideoElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698