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

Side by Side Diff: chrome/browser/resources/md_history/browser_service.js

Issue 2172563002: [MD History] Use openForeignSession message to open foreign session tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_menu_up
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Defines a singleton object, md_history.BrowserService, which 6 * @fileoverview Defines a singleton object, md_history.BrowserService, which
7 * provides access to chrome.send APIs. 7 * provides access to chrome.send APIs.
8 */ 8 */
9 9
10 cr.define('md_history', function() { 10 cr.define('md_history', function() {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 return this.pendingDeletePromise_.promise; 42 return this.pendingDeletePromise_.promise;
43 }, 43 },
44 44
45 /** 45 /**
46 * @param {!string} url 46 * @param {!string} url
47 */ 47 */
48 removeBookmark: function(url) { 48 removeBookmark: function(url) {
49 chrome.send('removeBookmark', [url]); 49 chrome.send('removeBookmark', [url]);
50 }, 50 },
51 51
52 /**
53 * @param {string} sessionTag
54 */
55 openForeignSessionAllTabs: function(sessionTag) {
56 chrome.send('openForeignSession', [sessionTag]);
57 },
58
59 /**
60 * @param {string} sessionTag
61 * @param {number} windowId
62 * @param {number} tabId
63 * @param {Event} e
64 */
65 openForeignSessionTab: function(sessionTag, windowId, tabId, e) {
66 chrome.send('openForeignSession', [
67 sessionTag, String(windowId), String(tabId), e.button || 0, e.altKey,
68 e.ctrlKey, e.metaKey, e.shiftKey
69 ]);
70 },
71
52 openClearBrowsingData: function() { 72 openClearBrowsingData: function() {
53 chrome.send('clearBrowsingData'); 73 chrome.send('clearBrowsingData');
54 }, 74 },
55 75
56 /** 76 /**
57 * @param {boolean} successful 77 * @param {boolean} successful
58 * @private 78 * @private
59 */ 79 */
60 resolveDelete_: function(successful) { 80 resolveDelete_: function(successful) {
61 if (this.pendingDeleteItems_ == null || 81 if (this.pendingDeleteItems_ == null ||
(...skipping 23 matching lines...) Expand all
85 md_history.BrowserService.getInstance().resolveDelete_(true); 105 md_history.BrowserService.getInstance().resolveDelete_(true);
86 } 106 }
87 107
88 /** 108 /**
89 * Called by the history backend when the deletion failed. 109 * Called by the history backend when the deletion failed.
90 */ 110 */
91 function deleteFailed() { 111 function deleteFailed() {
92 md_history.BrowserService.getInstance().resolveDelete_(false); 112 md_history.BrowserService.getInstance().resolveDelete_(false);
93 } 113 }
94 114
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/browser_service.html ('k') | chrome/browser/resources/md_history/compiled_resources2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698