Lines Matching defs:this

2 // Use of this source code is governed by a BSD-style license that can be
24 privates(extensionoptionsNode).internal = this;
25 this.extensionoptionsNode = extensionoptionsNode;
26 this.viewInstanceId = IdGenerator.GetNextId();
28 this.autosizeDeferred = false;
31 this.eventHandlers = {};
37 this.setupEventProperty('createfailed');
38 new ExtensionOptionsEvents(this, this.viewInstanceId);
40 this.setupNodeProperties();
42 this.parseExtensionAttribute();
46 this.browserPluginNode = this.createBrowserPluginNode();
47 var shadowRoot = this.extensionoptionsNode.createShadowRoot();
48 shadowRoot.appendChild(this.browserPluginNode);
53 this.internalInstanceId,
54 this.guestInstanceId,
56 'autosize': this.extensionoptionsNode.hasAttribute('autosize'),
57 'instanceId': this.viewInstanceId,
58 'maxheight': parseInt(this.maxheight || 0),
59 'maxwidth': parseInt(this.maxwidth || 0),
60 'minheight': parseInt(this.minheight || 0),
61 'minwidth': parseInt(this.minwidth || 0)
67 privates(browserPluginNode).internal = this;
73 'extensionId': this.extensionId,
82 this.initCalled = false;
84 this.dispatchEvent(createFailedEvent);
86 this.guestInstanceId = guestInstanceId;
87 this.attachWindow();
89 }.bind(this));
94 return this.extensionoptionsNode.dispatchEvent(extensionOptionsEvent);
108 this.extensionId = newValue;
111 if (!this.internalInstanceId)
115 if (!this.guestInstanceId) {
116 this.createGuest();
122 this[name] = newValue;
123 this.resetSizeConstraintsIfInvalid();
125 if (!this.guestInstanceId)
128 GuestViewInternal.setAutoSize(this.guestInstanceId, {
129 'enableAutoSize': this.extensionoptionsNode.hasAttribute('autosize'),
131 'width': parseInt(this.minwidth || 0),
132 'height': parseInt(this.minheight || 0)
135 'width': parseInt(this.maxwidth || 0),
136 'height': parseInt(this.maxheight || 0)
145 this.internalInstanceId = parseInt(newValue);
146 this.browserPluginNode.removeAttribute('internalinstanceid');
147 if (this.extensionId)
148 this.createGuest();
155 if (this.autosizeDeferred) {
156 this.deferredAutoSizeState = {
163 this.resize(newWidth, newHeight, oldWidth, oldHeight);
168 if (this.extensionoptionsNode.hasAttribute('extension')) {
169 this.extensionId = this.extensionoptionsNode.getAttribute('extension');
177 this.browserPluginNode.style.width = newWidth + 'px';
178 this.browserPluginNode.style.height = newHeight + 'px';
183 if (newWidth > this.minwidth)
184 this.minwidth = newWidth;
185 if (newHeight > this.minheight)
186 this.minheight = newHeight;
188 GuestViewInternal.setAutoSize(this.guestInstanceId, {
189 'enableAutoSize': this.extensionoptionsNode.hasAttribute('autosize'),
191 'width': parseInt(this.minwidth || 0),
192 'height': parseInt(this.minheight || 0)
195 'width': parseInt(this.maxwidth || 0),
196 'height': parseInt(this.maxheight || 0)
205 var extensionoptionsNode = this.extensionoptionsNode;
208 return this.eventHandlers[propertyName];
209 }.bind(this),
211 if (this.eventHandlers[propertyName])
213 eventName, this.eventHandlers[propertyName]);
214 this.eventHandlers[propertyName] = value;
217 }.bind(this),
226 if (this.extensionoptionsNode.hasAttribute(attributeName)) {
227 this[attributeName] =
228 this.extensionoptionsNode.getAttribute(attributeName);
230 this[attributeName] = AUTO_SIZE_ATTRIBUTES[attributeName];
233 Object.defineProperty(this.extensionoptionsNode, attributeName, {
235 return this[attributeName];
236 }.bind(this),
238 this.extensionoptionsNode.setAttribute(attributeName, value);
239 }.bind(this),
242 }, this);
244 this.resetSizeConstraintsIfInvalid();
246 Object.defineProperty(this.extensionoptionsNode, 'extension', {
248 return this.extensionId;
249 }.bind(this),
251 this.extensionoptionsNode.setAttribute('extension', value);
252 }.bind(this),
258 if (this.minheight > this.maxheight || this.minheight < 0) {
259 this.minheight = AUTO_SIZE_ATTRIBUTES.minheight;
260 this.maxheight = AUTO_SIZE_ATTRIBUTES.maxheight;
262 if (this.minwidth > this.maxwidth || this.minwidth < 0) {
263 this.minwidth = AUTO_SIZE_ATTRIBUTES.minwidth;
264 this.maxwidth = AUTO_SIZE_ATTRIBUTES.maxwidth;
280 this.autosizeDeferred = value;
288 if (this.autosizeDeferred) {
289 this.resize(this.deferredAutoSizeState.newWidth,
290 this.deferredAutoSizeState.newHeight,
291 this.deferredAutoSizeState.oldWidth,
292 this.deferredAutoSizeState.oldHeight);
300 this.setAttribute('type', 'application/browser-plugin');
301 this.style.width = '100%';
302 this.style.height = '100%';
306 var internal = privates(this).internal;
315 var unused = this.nonExistentAttribute;
331 new ExtensionOptionsInternal(this);
335 var internal = privates(this).internal;
350 var internal = privates(this).internal;