Index: Source/core/html/shadow/PluginPlaceholderElement.js |
diff --git a/Source/core/html/shadow/PluginPlaceholderElement.js b/Source/core/html/shadow/PluginPlaceholderElement.js |
index 5ad777422342a5deb46c7a6c09325901351776cc..9d3ef2b37aa6d94de92edf79cf46ab0b0f2843c1 100644 |
--- a/Source/core/html/shadow/PluginPlaceholderElement.js |
+++ b/Source/core/html/shadow/PluginPlaceholderElement.js |
@@ -1,7 +1,38 @@ |
-/** |
- * This is a placeholder to create the |
- * IDR_PRIVATE_SCRIPT_PLUGINPLACEHOLDERELEMENT_JS resource. |
- * |
- * It will be replaced by a complete file in: |
- * https://codereview.chromium.org/522783002/ |
- */ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+'use strict'; |
+ |
+installClass('PluginPlaceholderElement', function(PluginPlaceholderElementPrototype) { |
+ PluginPlaceholderElementPrototype.createdCallback = function() { |
+ // FIXME: Move style out of script and into CSS. |
+ |
+ this.id = 'plugin-placeholder'; |
+ this.style.width = '100%'; |
+ this.style.height = '100%'; |
+ this.style.overflow = 'hidden'; |
+ this.style.display = 'flex'; |
+ this.style.alignItems = 'center'; |
+ this.style.backgroundColor = 'gray'; |
+ this.style.font = '12px -webkit-control'; |
+ |
+ var contentElement = document.createElement('div'); |
+ contentElement.id = 'plugin-placeholder-content'; |
+ contentElement.style.textAlign = 'center'; |
+ contentElement.style.margin = 'auto'; |
+ |
+ var messageElement = document.createElement('div'); |
+ messageElement.id = 'plugin-placeholder-message'; |
+ |
+ contentElement.appendChild(messageElement); |
+ this.appendChild(contentElement); |
+ |
+ this.messageElement = messageElement; |
+ }; |
+ |
+ Object.defineProperty(PluginPlaceholderElementPrototype, 'message', { |
+ get: function() { return this.messageElement.textContent; }, |
+ set: function(message) { this.messageElement.textContent = message; }, |
+ }); |
+}); |