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
3 // found in the LICENSE file.
5 var CreateEvent
= require('guestViewEvents').CreateEvent
;
6 var GuestViewEvents
= require('guestViewEvents').GuestViewEvents
;
8 function ExtensionOptionsEvents(extensionOptionsImpl
) {
9 GuestViewEvents
.call(this, extensionOptionsImpl
);
11 // |setupEventProperty| is normally called automatically, but the
12 // 'createfailed' event is registered here because the event is fired from
13 // ExtensionOptionsImpl instead of in response to an extension event.
14 this.setupEventProperty('createfailed');
17 ExtensionOptionsEvents
.prototype.__proto__
= GuestViewEvents
.prototype;
19 // A dictionary of <extensionoptions> extension events to be listened for. This
20 // dictionary augments |GuestViewEvents.EVENTS| in guest_view_events.js. See the
21 // documentation there for details.
22 ExtensionOptionsEvents
.EVENTS
= {
24 evt
: CreateEvent('extensionOptionsInternal.onClose')
27 evt
: CreateEvent('extensionOptionsInternal.onLoad')
29 'preferredsizechanged': {
30 evt
: CreateEvent('extensionOptionsInternal.onPreferredSizeChanged'),
31 fields
:['width', 'height']
35 ExtensionOptionsEvents
.prototype.getEvents = function() {
36 return ExtensionOptionsEvents
.EVENTS
;
40 exports
.ExtensionOptionsEvents
= ExtensionOptionsEvents
;