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

Unified Diff: remoting/webapp/app_remoting/js/context_menu_chrome.js

Issue 1816653002: Remove app_remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: remoting/webapp/app_remoting/js/context_menu_chrome.js
diff --git a/remoting/webapp/app_remoting/js/context_menu_chrome.js b/remoting/webapp/app_remoting/js/context_menu_chrome.js
deleted file mode 100644
index 285eb0cff000f54ac81d7fa2a4844a3e2afec8a5..0000000000000000000000000000000000000000
--- a/remoting/webapp/app_remoting/js/context_menu_chrome.js
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2014 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
- * remoting.ContextMenuAdapter implementation backed by chrome.contextMenus.
- */
-
-'use strict';
-
-/** @suppress {duplicate} */
-var remoting = remoting || {};
-
-/**
- * @constructor
- * @implements {remoting.ContextMenuAdapter}
- */
-remoting.ContextMenuChrome = function() {};
-
-remoting.ContextMenuChrome.prototype.dispose = function() {
- chrome.contextMenus.removeAll();
-};
-
-/**
- * @param {string} id An identifier for the menu entry.
- * @param {string} title The text to display in the menu.
- * @param {boolean} isCheckable True if the state of this menu entry should
- * have a check-box and manage its toggle state automatically.
- * @param {string=} opt_parentId The id of the parent menu item for submenus.
- */
-remoting.ContextMenuChrome.prototype.create = function(
- id, title, isCheckable, opt_parentId) {
- if (!opt_parentId) {
- var message = {
- method: 'addContextMenuId',
- id: id
- };
- chrome.runtime.getBackgroundPage(this.postMessage_.bind(this, message));
- }
- var params = {
- id: id,
- contexts: ['launcher'],
- title: title,
- parentId: opt_parentId
- };
- if (isCheckable) {
- params.type = 'checkbox';
- }
- chrome.contextMenus.create(params);
-};
-
-/**
- * @param {string} id
- * @param {string} title
- */
-remoting.ContextMenuChrome.prototype.updateTitle = function(id, title) {
- chrome.contextMenus.update(id, {title: title});
-};
-
-/**
- * @param {string} id
- * @param {boolean} checked
- */
-remoting.ContextMenuChrome.prototype.updateCheckState = function(id, checked) {
- chrome.contextMenus.update(id, {checked: checked});
-};
-
-/**
- * @param {string} id
- */
-remoting.ContextMenuChrome.prototype.remove = function(id) {
- chrome.contextMenus.remove(id);
- var message = {
- method: 'removeContextMenuId',
- id: id
- };
- chrome.runtime.getBackgroundPage(this.postMessage_.bind(this, message));
-};
-
-/**
- * @param {function(OnClickData):void} listener
- */
-remoting.ContextMenuChrome.prototype.addListener = function(listener) {
- chrome.contextMenus.onClicked.addListener(
- /** @type {function(Object, Tab=)} */ (listener));
-};
-
-/**
- * @param {*} message
- * @param {Window=} backgroundPage
- */
-remoting.ContextMenuChrome.prototype.postMessage_ = function(
- message, backgroundPage) {
- backgroundPage.postMessage(message, '*');
-};
« no previous file with comments | « remoting/webapp/app_remoting/js/context_menu_adapter.js ('k') | remoting/webapp/app_remoting/js/context_menu_dom.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698