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

Side by Side Diff: extensions/renderer/resources/app_window_custom_bindings.js

Issue 2973903002: [Extensions Bindings] Introduce a supportsLazyListeners property (Closed)
Patch Set: onMessage event fix Created 3 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Custom binding for the app_window API. 5 // Custom binding for the app_window API.
6 6
7 var appWindowNatives = requireNative('app_window_natives'); 7 var appWindowNatives = requireNative('app_window_natives');
8 var runtimeNatives = requireNative('runtime'); 8 var runtimeNatives = requireNative('runtime');
9 var forEach = require('utils').forEach; 9 var forEach = require('utils').forEach;
10 var renderFrameObserverNatives = requireNative('renderFrameObserverNatives'); 10 var renderFrameObserverNatives = requireNative('renderFrameObserverNatives');
11 11
12 var appWindowData = null; 12 var appWindowData = null;
13 var currentAppWindow = null; 13 var currentAppWindow = null;
14 var currentWindowInternal = null; 14 var currentWindowInternal = null;
15 15
16 var kSetBoundsFunction = 'setBounds'; 16 var kSetBoundsFunction = 'setBounds';
17 var kSetSizeConstraintsFunction = 'setSizeConstraints'; 17 var kSetSizeConstraintsFunction = 'setSizeConstraints';
18 18
19 if (!apiBridge) 19 if (!apiBridge)
20 var binding = require('binding').Binding; 20 var binding = require('binding').Binding;
21 21
22 var jsEvent; 22 var jsEvent;
23 function createAnonymousEvent() { 23 function createAnonymousEvent() {
24 if (bindingUtil) { 24 if (bindingUtil) {
25 var supportsFilters = false;
26 var supportsLazyListeners = false;
25 // Native custom events ignore schema. 27 // Native custom events ignore schema.
26 return bindingUtil.createCustomEvent(undefined, undefined, false); 28 return bindingUtil.createCustomEvent(undefined, undefined, supportsFilters,
29 supportsLazyListeners);
27 } 30 }
28 if (!jsEvent) 31 if (!jsEvent)
29 jsEvent = require('event_bindings').Event; 32 jsEvent = require('event_bindings').Event;
30 return new jsEvent(); 33 return new jsEvent();
31 } 34 }
32 35
33 // Bounds class definition. 36 // Bounds class definition.
34 var Bounds = function(boundsKey) { 37 var Bounds = function(boundsKey) {
35 privates(this).boundsKey_ = boundsKey; 38 privates(this).boundsKey_ = boundsKey;
36 }; 39 };
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 constraints[key] = 0; 398 constraints[key] = 0;
396 }); 399 });
397 400
398 currentWindowInternal.setSizeConstraints(boundsType, constraints); 401 currentWindowInternal.setSizeConstraints(boundsType, constraints);
399 } 402 }
400 403
401 if (!apiBridge) 404 if (!apiBridge)
402 exports.$set('binding', appWindow.generate()); 405 exports.$set('binding', appWindow.generate());
403 exports.$set('onAppWindowClosed', onAppWindowClosed); 406 exports.$set('onAppWindowClosed', onAppWindowClosed);
404 exports.$set('updateAppWindowProperties', updateAppWindowProperties); 407 exports.$set('updateAppWindowProperties', updateAppWindowProperties);
OLDNEW
« no previous file with comments | « extensions/renderer/native_extension_bindings_system.cc ('k') | extensions/renderer/resources/context_menus_handlers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698