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 privateScriptController.installClass('PluginPlaceholderElement', function(Plugin
PlaceholderElementPrototype) { |
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;' + | 11 ' all: initial;' + |
12 ' width: 100%;' + | 12 ' width: 100%;' + |
13 ' height: 100%;' + | 13 ' height: 100%;' + |
14 ' overflow: hidden;' + | 14 ' overflow: hidden;' + |
15 ' display: flex;' + | 15 ' display: flex;' + |
16 ' align-items: center;' + | 16 ' align-items: center;' + |
17 ' background: gray;' + | 17 ' background: gray;' + |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 Object.defineProperty(PluginPlaceholderElementPrototype, 'message', { | 94 Object.defineProperty(PluginPlaceholderElementPrototype, 'message', { |
95 get: function() { return this.messageElement.textContent; }, | 95 get: function() { return this.messageElement.textContent; }, |
96 set: function(message) { this.messageElement.textContent = message; }, | 96 set: function(message) { this.messageElement.textContent = message; }, |
97 }); | 97 }); |
98 | 98 |
99 Object.defineProperty(PluginPlaceholderElementPrototype, 'closeable', { | 99 Object.defineProperty(PluginPlaceholderElementPrototype, 'closeable', { |
100 get: function() { return this.closeButton.style.display != 'none'; }, | 100 get: function() { return this.closeButton.style.display != 'none'; }, |
101 set: function(closeable) { this.closeButton.style.display = closeable ?
'' : 'none'; }, | 101 set: function(closeable) { this.closeButton.style.display = closeable ?
'' : 'none'; }, |
102 }); | 102 }); |
103 }); | 103 }); |
OLD | NEW |