forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert of Update json_schema_compiler to handle the Automation extens…
…ion API (patchset chromium#12 id:220001 of https://codereview.chromium.org/2601333002/ ) Reason for revert: interactive_uitests failing for 50 times in a row https://uberchromegw.corp.google.com/i/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%281%29?numbuilds=100 see crbug.com/683915 Original issue's description: > Update json_schema_compiler to handle the Automation extension API > > This allows the automation externs file to be fully autogenerated. > > Lots of tweaks to ChromeVox were required since we've been working with a > hand-tweaked externs file for a while. > > BUG=none > CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation > > Review-Url: https://codereview.chromium.org/2601333002 > Cr-Commit-Position: refs/heads/master@{#445146} > Committed: https://chromium.googlesource.com/chromium/src/+/f1cbfff18b19ff99310ffbfb94ca75462da7a859 TBR=dbeam@chromium.org,dtseng@chromium.org,rdevlin.cronin@chromium.org,dmazzoni@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=683915 Review-Url: https://codereview.chromium.org/2650733002 Cr-Commit-Position: refs/heads/master@{#445428}
- Loading branch information
Showing
54 changed files
with
1,040 additions
and
1,734 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
.../resources/chromeos/chromevox/cvox2/background/automation_object_constructor_installer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2016 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/** | ||
* @fileoverview Provides bindings to instantiate objects in the automation API. | ||
* | ||
* Due to restrictions in the extension system, it is not ordinarily possible to | ||
* construct an object defined by the extension API. However, given an instance | ||
* of that object, we can save its constructor for future use. | ||
*/ | ||
|
||
goog.provide('AutomationObjectConstructorInstaller'); | ||
|
||
/** | ||
* Installs the AutomationNode and AutomationEvent classes based on an | ||
* AutomationNode instance. | ||
* @param {chrome.automation.AutomationNode} node | ||
* @param {function()} callback Called when installation finishes. | ||
*/ | ||
AutomationObjectConstructorInstaller.init = function(node, callback) { | ||
chrome.automation.AutomationNode = | ||
/** @type {function (new:chrome.automation.AutomationNode)} */( | ||
node.constructor); | ||
node.addEventListener(chrome.automation.EventType.childrenChanged, | ||
function installAutomationEvent(e) { | ||
chrome.automation.AutomationEvent = | ||
/** @type {function (new:chrome.automation.AutomationEvent)} */( | ||
e.constructor); | ||
node.removeEventListener( | ||
chrome.automation.EventType.childrenChanged, | ||
installAutomationEvent, | ||
true); | ||
callback(); | ||
}, | ||
true); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.