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

Side by Side Diff: chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.cc

Issue 2834493006: MD Bookmarks: Pull context menu into separate element (Closed)
Patch Set: Switch back to using a Command enum Created 3 years, 8 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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.h" 5 #include "chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 AddLocalizedString(source, "title", IDS_MD_BOOKMARK_MANAGER_TITLE); 70 AddLocalizedString(source, "title", IDS_MD_BOOKMARK_MANAGER_TITLE);
71 71
72 // Resources. 72 // Resources.
73 source->AddResourcePath("actions.html", IDR_MD_BOOKMARKS_ACTIONS_HTML); 73 source->AddResourcePath("actions.html", IDR_MD_BOOKMARKS_ACTIONS_HTML);
74 source->AddResourcePath("actions.js", IDR_MD_BOOKMARKS_ACTIONS_JS); 74 source->AddResourcePath("actions.js", IDR_MD_BOOKMARKS_ACTIONS_JS);
75 source->AddResourcePath("api_listener.html", 75 source->AddResourcePath("api_listener.html",
76 IDR_MD_BOOKMARKS_API_LISTENER_HTML); 76 IDR_MD_BOOKMARKS_API_LISTENER_HTML);
77 source->AddResourcePath("api_listener.js", IDR_MD_BOOKMARKS_API_LISTENER_JS); 77 source->AddResourcePath("api_listener.js", IDR_MD_BOOKMARKS_API_LISTENER_JS);
78 source->AddResourcePath("app.html", IDR_MD_BOOKMARKS_APP_HTML); 78 source->AddResourcePath("app.html", IDR_MD_BOOKMARKS_APP_HTML);
79 source->AddResourcePath("app.js", IDR_MD_BOOKMARKS_APP_JS); 79 source->AddResourcePath("app.js", IDR_MD_BOOKMARKS_APP_JS);
80 source->AddResourcePath("command_manager.html",
81 IDR_MD_BOOKMARKS_COMMAND_MANAGER_HTML);
82 source->AddResourcePath("command_manager.js",
83 IDR_MD_BOOKMARKS_COMMAND_MANAGER_JS);
80 source->AddResourcePath("constants.html", IDR_MD_BOOKMARKS_CONSTANTS_HTML); 84 source->AddResourcePath("constants.html", IDR_MD_BOOKMARKS_CONSTANTS_HTML);
81 source->AddResourcePath("constants.js", IDR_MD_BOOKMARKS_CONSTANTS_JS); 85 source->AddResourcePath("constants.js", IDR_MD_BOOKMARKS_CONSTANTS_JS);
82 source->AddResourcePath("dnd_manager.html", 86 source->AddResourcePath("dnd_manager.html",
83 IDR_MD_BOOKMARKS_DND_MANAGER_HTML); 87 IDR_MD_BOOKMARKS_DND_MANAGER_HTML);
84 source->AddResourcePath("dnd_manager.js", IDR_MD_BOOKMARKS_DND_MANAGER_JS); 88 source->AddResourcePath("dnd_manager.js", IDR_MD_BOOKMARKS_DND_MANAGER_JS);
85 source->AddResourcePath("edit_dialog.html", 89 source->AddResourcePath("edit_dialog.html",
86 IDR_MD_BOOKMARKS_EDIT_DIALOG_HTML); 90 IDR_MD_BOOKMARKS_EDIT_DIALOG_HTML);
87 source->AddResourcePath("edit_dialog.js", IDR_MD_BOOKMARKS_EDIT_DIALOG_JS); 91 source->AddResourcePath("edit_dialog.js", IDR_MD_BOOKMARKS_EDIT_DIALOG_JS);
88 source->AddResourcePath("folder_node.html", 92 source->AddResourcePath("folder_node.html",
89 IDR_MD_BOOKMARKS_FOLDER_NODE_HTML); 93 IDR_MD_BOOKMARKS_FOLDER_NODE_HTML);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Set up the chrome://bookmarks/ source. 129 // Set up the chrome://bookmarks/ source.
126 Profile* profile = Profile::FromWebUI(web_ui); 130 Profile* profile = Profile::FromWebUI(web_ui);
127 content::WebUIDataSource::Add(profile, 131 content::WebUIDataSource::Add(profile,
128 CreateMdBookmarksUIHTMLSource(profile)); 132 CreateMdBookmarksUIHTMLSource(profile));
129 } 133 }
130 134
131 // static 135 // static
132 bool MdBookmarksUI::IsEnabled() { 136 bool MdBookmarksUI::IsEnabled() {
133 return base::FeatureList::IsEnabled(features::kMaterialDesignBookmarks); 137 return base::FeatureList::IsEnabled(features::kMaterialDesignBookmarks);
134 } 138 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698