blob: 5aab78cd5d2ea7de6ae83f145114768ea2726bd9 [file] [log] [blame]
// Copyright 2018 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 A helper object used to open a URL in a new tab.
* the browser.
*/
cr.exportPath('settings');
cr.define('settings', function() {
/** @interface */
class OpenWindowProxy {
/**
* Opens the specified URL in a new tab.
* @param {string} url
*/
openURL(url) {}
}
/** @implements {settings.OpenWindowProxy} */
class OpenWindowProxyImpl {
/** @override */
openURL(url) {
window.open(url);
}
}
cr.addSingletonGetter(OpenWindowProxyImpl);
return {
OpenWindowProxy: OpenWindowProxy,
OpenWindowProxyImpl: OpenWindowProxyImpl,
};
});