| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |