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

Side by Side Diff: Source/core/html/MediaDocument.cpp

Issue 22880029: Make AttachBehavior a required argument. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | « Source/core/html/HTMLTitleElement.cpp ('k') | Source/core/html/RangeInputType.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 RefPtr<HTMLSourceElement> source = HTMLSourceElement::create(document()); 93 RefPtr<HTMLSourceElement> source = HTMLSourceElement::create(document());
94 source->setSrc(document()->url()); 94 source->setSrc(document()->url());
95 95
96 if (DocumentLoader* loader = document()->loader()) 96 if (DocumentLoader* loader = document()->loader())
97 source->setType(loader->responseMIMEType()); 97 source->setType(loader->responseMIMEType());
98 98
99 media->appendChild(source.release(), ASSERT_NO_EXCEPTION, AttachLazily); 99 media->appendChild(source.release(), ASSERT_NO_EXCEPTION, AttachLazily);
100 100
101 RefPtr<HTMLBodyElement> body = HTMLBodyElement::create(document()); 101 RefPtr<HTMLBodyElement> body = HTMLBodyElement::create(document());
102 body->appendChild(media.release(), ASSERT_NO_EXCEPTION); 102 body->appendChild(media.release(), ASSERT_NO_EXCEPTION, DeprecatedAttachNow) ;
103 103
104 rootElement->appendChild(head.release(), ASSERT_NO_EXCEPTION, AttachLazily); 104 rootElement->appendChild(head.release(), ASSERT_NO_EXCEPTION, AttachLazily);
105 rootElement->appendChild(body.release(), ASSERT_NO_EXCEPTION, AttachLazily); 105 rootElement->appendChild(body.release(), ASSERT_NO_EXCEPTION, AttachLazily);
106 106
107 m_didBuildDocumentStructure = true; 107 m_didBuildDocumentStructure = true;
108 } 108 }
109 109
110 size_t MediaDocumentParser::appendBytes(const char*, size_t) 110 size_t MediaDocumentParser::appendBytes(const char*, size_t)
111 { 111 {
112 if (m_didBuildDocumentStructure) 112 if (m_didBuildDocumentStructure)
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 if (video->canPlay()) 159 if (video->canPlay())
160 video->play(); 160 video->play();
161 } else 161 } else
162 video->pause(); 162 video->pause();
163 event->setDefaultHandled(); 163 event->setDefaultHandled();
164 } 164 }
165 } 165 }
166 } 166 }
167 167
168 } 168 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTitleElement.cpp ('k') | Source/core/html/RangeInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698