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

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

Issue 2258033002: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. Created 4 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
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 recordDownloadMetric(MediaDocumentDownloadButtonClicked); 117 recordDownloadMetric(MediaDocumentDownloadButtonClicked);
118 m_clicked = true; 118 m_clicked = true;
119 } 119 }
120 } 120 }
121 121
122 bool m_clicked; 122 bool m_clicked;
123 }; 123 };
124 124
125 void MediaDocumentParser::createDocumentStructure() 125 void MediaDocumentParser::createDocumentStructure()
126 { 126 {
127 ASSERT(document()); 127 DCHECK(document());
128 HTMLHtmlElement* rootElement = HTMLHtmlElement::create(*document()); 128 HTMLHtmlElement* rootElement = HTMLHtmlElement::create(*document());
129 document()->appendChild(rootElement); 129 document()->appendChild(rootElement);
130 rootElement->insertedByParser(); 130 rootElement->insertedByParser();
131 131
132 if (isDetached()) 132 if (isDetached())
133 return; // runScriptsAtDocumentElementAvailable can detach the frame. 133 return; // runScriptsAtDocumentElementAvailable can detach the frame.
134 134
135 HTMLHeadElement* head = HTMLHeadElement::create(*document()); 135 HTMLHeadElement* head = HTMLHeadElement::create(*document());
136 HTMLMetaElement* meta = HTMLMetaElement::create(*document()); 136 HTMLMetaElement* meta = HTMLMetaElement::create(*document());
137 meta->setAttribute(nameAttr, "viewport"); 137 meta->setAttribute(nameAttr, "viewport");
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 KeyboardEvent* keyboardEvent = toKeyboardEvent(event); 256 KeyboardEvent* keyboardEvent = toKeyboardEvent(event);
257 if (keyboardEvent->key() == " " || keyboardEvent->keyCode() == VKEY_MEDI A_PLAY_PAUSE) { 257 if (keyboardEvent->key() == " " || keyboardEvent->keyCode() == VKEY_MEDI A_PLAY_PAUSE) {
258 // space or media key (play/pause) 258 // space or media key (play/pause)
259 video->togglePlayState(); 259 video->togglePlayState();
260 event->setDefaultHandled(); 260 event->setDefaultHandled();
261 } 261 }
262 } 262 }
263 } 263 }
264 264
265 } // namespace blink 265 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/LabelsNodeList.h ('k') | third_party/WebKit/Source/core/html/MediaFragmentURIParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698