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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 installClass('PluginPlaceholderElement', function(PluginPlaceholderElementProtot
ype) { | 7 installClass('PluginPlaceholderElement', function(PluginPlaceholderElementProtot
ype) { |
8 // FIXME: Load this from a .css file. | 8 // FIXME: Load this from a .css file. |
9 var styleSource = | 9 var styleSource = |
10 '#plugin-placeholder {' + | 10 '#plugin-placeholder {' + |
11 ' all: initial;' + | |
12 ' width: 100%;' + | 11 ' width: 100%;' + |
13 ' height: 100%;' + | 12 ' height: 100%;' + |
14 ' overflow: hidden;' + | 13 ' overflow: hidden;' + |
15 ' display: flex;' + | 14 ' display: flex;' + |
16 ' align-items: center;' + | 15 ' align-items: center;' + |
17 ' background: gray;' + | 16 ' background: gray;' + |
18 ' font: 12px -webkit-control;' + | 17 ' font: 12px -webkit-control;' + |
19 '}' + | 18 '}' + |
20 '#plugin-placeholder-content {' + | 19 '#plugin-placeholder-content {' + |
21 ' text-align: center;' + | 20 ' text-align: center;' + |
(...skipping 17 matching lines...) Expand all Loading... |
39 this.appendChild(contentElement); | 38 this.appendChild(contentElement); |
40 | 39 |
41 this.messageElement = messageElement; | 40 this.messageElement = messageElement; |
42 }; | 41 }; |
43 | 42 |
44 Object.defineProperty(PluginPlaceholderElementPrototype, 'message', { | 43 Object.defineProperty(PluginPlaceholderElementPrototype, 'message', { |
45 get: function() { return this.messageElement.textContent; }, | 44 get: function() { return this.messageElement.textContent; }, |
46 set: function(message) { this.messageElement.textContent = message; }, | 45 set: function(message) { this.messageElement.textContent = message; }, |
47 }); | 46 }); |
48 }); | 47 }); |
OLD | NEW |