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

Unified Diff: chrome/browser/resources/bookmark_manager/js/main.js

Issue 10966025: Change bookmarkManager API from experimental to private. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bookmarkManager->bookmarkManagerPrivate Created 8 years, 3 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: chrome/browser/resources/bookmark_manager/js/main.js
diff --git a/chrome/browser/resources/bookmark_manager/js/main.js b/chrome/browser/resources/bookmark_manager/js/main.js
index 5494968430964aad21e18630728dafc4f1d792b5..5a9d9e7bb9b7ad993be8ecc6781626fd0c4b640d 100644
--- a/chrome/browser/resources/bookmark_manager/js/main.js
+++ b/chrome/browser/resources/bookmark_manager/js/main.js
@@ -19,7 +19,7 @@ if (!chrome.bookmarks)
console.error('Bookmarks extension API is not available');
// Get the localized strings from the backend.
-chrome.experimental.bookmarkManager.getStrings(function(data) {
+chrome.bookmarkManagerPrivate.getStrings(function(data) {
// The strings may contain & which we need to strip.
for (var key in data) {
data[key] = data[key].replace(/&/, '');
@@ -219,7 +219,7 @@ list.addEventListener('dblclick', function(e) {
// folder part.
list.addEventListener('urlClicked', function(e) {
getLinkController().openUrlFromEvent(e.url, e.originalEvent);
- chrome.experimental.bookmarkManager.recordLaunch();
+ chrome.bookmarkManagerPrivate.recordLaunch();
});
$('term').onsearch = function(e) {
@@ -543,7 +543,7 @@ var dnd = {
return node.id;
});
- chrome.experimental.bookmarkManager.startDrag(ids);
+ chrome.bookmarkManagerPrivate.startDrag(ids);
}
},
@@ -770,9 +770,9 @@ var dnd = {
selectItemsAfterUserAction(selectTarget, selectedTreeId);
if (index != undefined && index != -1)
- chrome.experimental.bookmarkManager.drop(parentId, index);
+ chrome.bookmarkManagerPrivate.drop(parentId, index);
else
- chrome.experimental.bookmarkManager.drop(parentId);
+ chrome.bookmarkManagerPrivate.drop(parentId);
e.preventDefault();
@@ -804,11 +804,11 @@ var dnd = {
document.addEventListener('dragend', deferredClearData);
document.addEventListener('mouseup', deferredClearData);
- chrome.experimental.bookmarkManager.onDragEnter.addListener(
+ chrome.bookmarkManagerPrivate.onDragEnter.addListener(
this.handleChromeDragEnter.bind(this));
- chrome.experimental.bookmarkManager.onDragLeave.addListener(
+ chrome.bookmarkManagerPrivate.onDragLeave.addListener(
deferredClearData);
- chrome.experimental.bookmarkManager.onDrop.addListener(deferredClearData);
+ chrome.bookmarkManagerPrivate.onDrop.addListener(deferredClearData);
}
};
@@ -834,7 +834,7 @@ for (var i = 0, command; command = commands[i]; i++) {
}
var canEdit = true;
-chrome.experimental.bookmarkManager.canEdit(function(result) {
+chrome.bookmarkManagerPrivate.canEdit(function(result) {
canEdit = result;
});
@@ -855,7 +855,7 @@ chrome.systemPrivate.getIncognitoModeAvailability(function(result) {
* New Windows are not allowed in Windows 8 metro mode.
*/
var canOpenNewWindows = true;
-chrome.experimental.bookmarkManager.canOpenNewWindows(function(result) {
+chrome.bookmarkManagerPrivate.canOpenNewWindows(function(result) {
canOpenNewWindows = result;
});
@@ -936,7 +936,7 @@ function updatePasteCommand(opt_f) {
if (list.isSearch() || list.isRecent()) {
update(false);
} else {
- chrome.experimental.bookmarkManager.canPaste(list.parentId, update);
+ chrome.bookmarkManagerPrivate.canPaste(list.parentId, update);
}
}
@@ -1146,7 +1146,7 @@ function updateEditingCommands() {
var editingCommands = ['cut', 'delete', 'rename-folder', 'edit',
'add-new-bookmark', 'new-folder', 'sort', 'paste'];
- chrome.experimental.bookmarkManager.canEdit(function(result) {
+ chrome.bookmarkManagerPrivate.canEdit(function(result) {
if (result != canEdit) {
canEdit = result;
editingCommands.forEach(function(baseId) {
@@ -1335,7 +1335,7 @@ function openBookmarks(kind) {
addNodes(v);
});
getLinkController().openUrls(urls, kind);
- chrome.experimental.bookmarkManager.recordLaunch();
+ chrome.bookmarkManagerPrivate.recordLaunch();
});
}
@@ -1566,20 +1566,20 @@ function handleCommand(e) {
deleteBookmarks();
break;
case 'copy-command':
- chrome.experimental.bookmarkManager.copy(getSelectedBookmarkIds(),
- updatePasteCommand);
+ chrome.bookmarkManagerPrivate.copy(getSelectedBookmarkIds(),
+ updatePasteCommand);
break;
case 'cut-command':
- chrome.experimental.bookmarkManager.cut(getSelectedBookmarkIds(),
- updatePasteCommand);
+ chrome.bookmarkManagerPrivate.cut(getSelectedBookmarkIds(),
+ updatePasteCommand);
break;
case 'paste-command':
selectItemsAfterUserAction(list);
- chrome.experimental.bookmarkManager.paste(list.parentId,
- getSelectedBookmarkIds());
+ chrome.bookmarkManagerPrivate.paste(list.parentId,
+ getSelectedBookmarkIds());
break;
case 'sort-command':
- chrome.experimental.bookmarkManager.sortChildren(list.parentId);
+ chrome.bookmarkManagerPrivate.sortChildren(list.parentId);
break;
case 'rename-folder-command':
case 'edit-command':
« no previous file with comments | « chrome/browser/resources/bookmark_manager/js/bmm_test.html ('k') | chrome/browser/resources/bookmark_manager/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698