Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/html/shadow/PluginPlaceholderElement.h" | 6 #include "core/html/shadow/PluginPlaceholderElement.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/V8PluginPlaceholderElement.h" | 8 #include "bindings/core/v8/V8PluginPlaceholderElement.h" |
| 9 #include "core/UserAgentStyleSheets.h" | |
| 9 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
| 10 #include "wtf/Assertions.h" | 11 #include "wtf/Assertions.h" |
| 12 #include "wtf/text/WTFString.h" | |
| 11 | 13 |
| 12 namespace blink { | 14 namespace blink { |
| 13 | 15 |
| 14 PluginPlaceholderElement::PluginPlaceholderElement(Document& document) | 16 PluginPlaceholderElement::PluginPlaceholderElement(Document& document) |
| 15 : HTMLDivElement(document) | 17 : HTMLDivElement(document) |
| 16 { | 18 { |
| 17 ScriptWrappable::init(this); | 19 ScriptWrappable::init(this); |
| 18 } | 20 } |
| 19 | 21 |
| 20 PassRefPtrWillBeRawPtr<PluginPlaceholderElement> PluginPlaceholderElement::creat e(Document& document) | 22 PassRefPtrWillBeRawPtr<PluginPlaceholderElement> PluginPlaceholderElement::creat e(Document& document) |
| 21 { | 23 { |
| 22 RefPtrWillBeRawPtr<PluginPlaceholderElement> element = adoptRefWillBeNoop(ne w PluginPlaceholderElement(document)); | 24 RefPtrWillBeRawPtr<PluginPlaceholderElement> element = adoptRefWillBeNoop(ne w PluginPlaceholderElement(document)); |
| 23 bool success = V8PluginPlaceholderElement::PrivateScript::createCallbackMeth od(document.frame(), element.get()); | 25 bool success = V8PluginPlaceholderElement::PrivateScript::createCallbackMeth od(document.frame(), element.get()); |
| 24 ASSERT_UNUSED(success, success); | 26 ASSERT_UNUSED(success, success); |
| 25 return element.release(); | 27 return element.release(); |
| 26 } | 28 } |
| 27 | 29 |
| 28 void PluginPlaceholderElement::setMessage(const String& htmlMessage) | 30 void PluginPlaceholderElement::setMessage(const String& htmlMessage) |
| 29 { | 31 { |
| 30 bool success = V8PluginPlaceholderElement::PrivateScript::messageAttributeSe tter(document().frame(), this, htmlMessage); | 32 bool success = V8PluginPlaceholderElement::PrivateScript::messageAttributeSe tter(document().frame(), this, htmlMessage); |
| 31 ASSERT_UNUSED(success, success); | 33 ASSERT_UNUSED(success, success); |
| 32 } | 34 } |
| 33 | 35 |
| 36 String PluginPlaceholderElement::styleSource() const | |
| 37 { | |
| 38 return pluginPlaceholderElementCss; | |
|
abarth-chromium
2014/09/02 22:34:34
Please use GRD to load this resource. See other c
jbroman
2014/09/02 23:53:32
I'd done that previously, though I had trouble. In
jbroman
2014/09/16 21:39:25
Done.
| |
| 39 } | |
| 40 | |
| 34 v8::Handle<v8::Object> PluginPlaceholderElement::wrap(v8::Handle<v8::Object> cre ationContext, v8::Isolate* isolate) | 41 v8::Handle<v8::Object> PluginPlaceholderElement::wrap(v8::Handle<v8::Object> cre ationContext, v8::Isolate* isolate) |
| 35 { | 42 { |
| 36 return blink::wrap(this, creationContext, isolate); | 43 return blink::wrap(this, creationContext, isolate); |
| 37 } | 44 } |
| 38 | 45 |
| 39 } // namespace blink | 46 } // namespace blink |
| OLD | NEW |