Add the ability to code generated prepopulated static nested structs
[chromium-blink-merge.git] / extensions / renderer / resources / guest_view / extension_view / extension_view_events.js
blob901085b1a94e3fa323afe9cb284e72eea04ab5c6
1 // Copyright 2015 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 // Event management for ExtensionView.
7 var CreateEvent = require('guestViewEvents').CreateEvent;
8 var GuestViewEvents = require('guestViewEvents').GuestViewEvents;
10 function ExtensionViewEvents(extensionViewImpl) {
11   GuestViewEvents.call(this, extensionViewImpl);
14 ExtensionViewEvents.prototype.__proto__ = GuestViewEvents.prototype;
16 ExtensionViewEvents.EVENTS = {
17   'loadcommit': {
18     evt: CreateEvent('extensionViewInternal.onLoadCommit'),
19     handler: 'handleLoadCommitEvent',
20     internal: true
21   }
24 ExtensionViewEvents.prototype.getEvents = function() {
25   return ExtensionViewEvents.EVENTS;
28 ExtensionViewEvents.prototype.handleLoadCommitEvent = function(event) {
29   this.view.onLoadCommit(event.url);
32 exports.ExtensionViewEvents = ExtensionViewEvents;