summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/settings/on_startup_page/on_startup_browser_proxy.js
blob: 96fe49b399e5782c2e9eb7e8b3087b57c615dc6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// 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.

/** @typedef {{id: string, name: string, canBeDisabled: boolean}} */
let NtpExtension;

cr.define('settings', function() {
  /** @interface */
  class OnStartupBrowserProxy {
    /** @return {!Promise<?NtpExtension>} */
    getNtpExtension() {}
  }

  /**
   * @implements {settings.OnStartupBrowserProxy}
   */
  class OnStartupBrowserProxyImpl {
    /** @override */
    getNtpExtension() {
      return cr.sendWithPromise('getNtpExtension');
    }
  }

  cr.addSingletonGetter(OnStartupBrowserProxyImpl);

  return {
    OnStartupBrowserProxy: OnStartupBrowserProxy,
    OnStartupBrowserProxyImpl: OnStartupBrowserProxyImpl,
  };
});