Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Side by Side Diff: chrome/renderer/resources/extensions/extension_options_events.js

Issue 987473002: Added the onResize and onContentResize events to GuestViewEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small fix. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 var CreateEvent = require('guestViewEvents').CreateEvent; 5 var CreateEvent = require('guestViewEvents').CreateEvent;
6 var GuestViewEvents = require('guestViewEvents').GuestViewEvents; 6 var GuestViewEvents = require('guestViewEvents').GuestViewEvents;
7 7
8 function ExtensionOptionsEvents(extensionOptionsImpl) { 8 function ExtensionOptionsEvents(extensionOptionsImpl) {
9 GuestViewEvents.call(this, extensionOptionsImpl); 9 GuestViewEvents.call(this, extensionOptionsImpl);
10 10
11 // setupEventProperty is normally called automatically, but the 'createfailed' 11 // |setupEventProperty| is normally called automatically, but the
12 // event is registered here because the event is fired from 12 // 'createfailed' event is registered here because the event is fired from
13 // ExtensionOptionsImpl instead of in response to an extension event. 13 // ExtensionOptionsImpl instead of in response to an extension event.
14 this.setupEventProperty('createfailed'); 14 this.setupEventProperty('createfailed');
15 } 15 }
16 16
17 ExtensionOptionsEvents.prototype.__proto__ = GuestViewEvents.prototype; 17 ExtensionOptionsEvents.prototype.__proto__ = GuestViewEvents.prototype;
18 18
19 // A dictionary of <extensionoptions> extension events to be listened for. This 19 // A dictionary of <extensionoptions> extension events to be listened for. This
20 // dictionary augments |GuestViewEvents.EVENTS| in guest_view_events.js. See the 20 // dictionary augments |GuestViewEvents.EVENTS| in guest_view_events.js. See the
21 // documentation there for details. 21 // documentation there for details.
22 ExtensionOptionsEvents.EVENTS = { 22 ExtensionOptionsEvents.EVENTS = {
(...skipping 21 matching lines...) Expand all
44 ExtensionOptionsEvents.prototype.handleSizeChangedEvent = function(event, 44 ExtensionOptionsEvents.prototype.handleSizeChangedEvent = function(event,
45 eventName) { 45 eventName) {
46 this.view.onSizeChanged( 46 this.view.onSizeChanged(
47 event.newWidth, event.newHeight, event.oldWidth, event.oldHeight); 47 event.newWidth, event.newHeight, event.oldWidth, event.oldHeight);
48 var extensionOptionsEvent = this.makeDomEvent(event, eventName); 48 var extensionOptionsEvent = this.makeDomEvent(event, eventName);
49 this.view.dispatchEvent(extensionOptionsEvent); 49 this.view.dispatchEvent(extensionOptionsEvent);
50 } 50 }
51 51
52 // Exports. 52 // Exports.
53 exports.ExtensionOptionsEvents = ExtensionOptionsEvents; 53 exports.ExtensionOptionsEvents = ExtensionOptionsEvents;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698