| 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 // Event management for WebView. | 5 // Event management for WebView. |
| 6 | 6 |
| 7 var DeclarativeWebRequestSchema = | 7 var DeclarativeWebRequestSchema = |
| 8 requireNative('schema_registry').GetSchema('declarativeWebRequest'); | 8 requireNative('schema_registry').GetSchema('declarativeWebRequest'); |
| 9 var EventBindings = require('event_bindings'); | 9 var EventBindings = require('event_bindings'); |
| 10 var IdGenerator = requireNative('id_generator'); | 10 var IdGenerator = requireNative('id_generator'); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 fields: [] | 51 fields: [] |
| 52 }, | 52 }, |
| 53 'dialog': { | 53 'dialog': { |
| 54 cancelable: true, | 54 cancelable: true, |
| 55 customHandler: function(handler, event, webViewEvent) { | 55 customHandler: function(handler, event, webViewEvent) { |
| 56 handler.handleDialogEvent(event, webViewEvent); | 56 handler.handleDialogEvent(event, webViewEvent); |
| 57 }, | 57 }, |
| 58 evt: CreateEvent('webViewInternal.onDialog'), | 58 evt: CreateEvent('webViewInternal.onDialog'), |
| 59 fields: ['defaultPromptText', 'messageText', 'messageType', 'url'] | 59 fields: ['defaultPromptText', 'messageText', 'messageType', 'url'] |
| 60 }, | 60 }, |
| 61 'droplink': { |
| 62 evt: CreateEvent('webViewInternal.onDropLink'), |
| 63 fields: ['url'] |
| 64 }, |
| 61 'exit': { | 65 'exit': { |
| 62 evt: CreateEvent('webViewInternal.onExit'), | 66 evt: CreateEvent('webViewInternal.onExit'), |
| 63 fields: ['processId', 'reason'] | 67 fields: ['processId', 'reason'] |
| 64 }, | 68 }, |
| 65 'findupdate': { | 69 'findupdate': { |
| 66 evt: CreateEvent('webViewInternal.onFindReply'), | 70 evt: CreateEvent('webViewInternal.onFindReply'), |
| 67 fields: [ | 71 fields: [ |
| 68 'searchText', | 72 'searchText', |
| 69 'numberOfMatches', | 73 'numberOfMatches', |
| 70 'activeMatchOrdinal', | 74 'activeMatchOrdinal', |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 this.webViewImpl, event, webViewEvent); | 329 this.webViewImpl, event, webViewEvent); |
| 326 }; | 330 }; |
| 327 | 331 |
| 328 WebViewEvents.prototype.handleSizeChangedEvent = function( | 332 WebViewEvents.prototype.handleSizeChangedEvent = function( |
| 329 event, webViewEvent) { | 333 event, webViewEvent) { |
| 330 this.webViewImpl.onSizeChanged(webViewEvent); | 334 this.webViewImpl.onSizeChanged(webViewEvent); |
| 331 }; | 335 }; |
| 332 | 336 |
| 333 exports.WebViewEvents = WebViewEvents; | 337 exports.WebViewEvents = WebViewEvents; |
| 334 exports.CreateEvent = CreateEvent; | 338 exports.CreateEvent = CreateEvent; |
| OLD | NEW |