diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-23 17:21:03 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-23 16:25:15 +0000 |
commit | c551f43206405019121bd2b2c93714319a0a3300 (patch) | |
tree | 1f48c30631c421fd4bbb3c36da20183c8a2ed7d7 /chromium/chrome/browser/resources/tab_strip/tab_strip_embedder_proxy.js | |
parent | 7961cea6d1041e3e454dae6a1da660b453efd238 (diff) |
BASELINE: Update Chromium to 79.0.3945.139
Change-Id: I336b7182fab9bca80b709682489c07db112eaca5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chrome/browser/resources/tab_strip/tab_strip_embedder_proxy.js')
-rw-r--r-- | chromium/chrome/browser/resources/tab_strip/tab_strip_embedder_proxy.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/chromium/chrome/browser/resources/tab_strip/tab_strip_embedder_proxy.js b/chromium/chrome/browser/resources/tab_strip/tab_strip_embedder_proxy.js new file mode 100644 index 00000000000..6852de8b29f --- /dev/null +++ b/chromium/chrome/browser/resources/tab_strip/tab_strip_embedder_proxy.js @@ -0,0 +1,39 @@ +// Copyright 2019 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. + +import {addSingletonGetter, addWebUIListener, sendWithPromise} from 'chrome://resources/js/cr.m.js'; + +export class TabStripEmbedderProxy { + /** @return {boolean} */ + isVisible() { + return document.visibilityState === 'visible'; + } + + /** + * @return {!Promise<!Object<string, string>>} Object with CSS variables + * as keys and rgba strings as values + */ + getColors() { + return sendWithPromise('getThemeColors'); + } + + observeThemeChanges() { + chrome.send('observeThemeChanges'); + } + + /** + * @param {number} tabId + * @param {number} locationX + * @param {number} locationY + */ + showTabContextMenu(tabId, locationX, locationY) { + chrome.send('showTabContextMenu', [tabId, locationX, locationY]); + } + + closeContainer() { + chrome.send('closeContainer'); + } +} + +addSingletonGetter(TabStripEmbedderProxy); |