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/ui/webui/md_bookmarks/md_bookmarks_ui.cc

Issue 2948943002: MD Bookmarks: Add full support for cut/copy/paste keyboard shortcuts (Closed)
Patch Set: Review comments Created 3 years, 5 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 #include <string> 8 #include <string>
9 #include <unordered_set> 9 #include <unordered_set>
10 #include <utility> 10 #include <utility>
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 MdBookmarksUI::MdBookmarksUI(content::WebUI* web_ui) : WebUIController(web_ui) { 181 MdBookmarksUI::MdBookmarksUI(content::WebUI* web_ui) : WebUIController(web_ui) {
182 // Set up the chrome://bookmarks/ source. 182 // Set up the chrome://bookmarks/ source.
183 Profile* profile = Profile::FromWebUI(web_ui); 183 Profile* profile = Profile::FromWebUI(web_ui);
184 content::WebUIDataSource::Add(profile, 184 content::WebUIDataSource::Add(profile,
185 CreateMdBookmarksUIHTMLSource(profile)); 185 CreateMdBookmarksUIHTMLSource(profile));
186 186
187 auto plural_string_handler = base::MakeUnique<PluralStringHandler>(); 187 auto plural_string_handler = base::MakeUnique<PluralStringHandler>();
188 plural_string_handler->AddLocalizedString( 188 plural_string_handler->AddLocalizedString(
189 "toastItemsDeleted", IDS_MD_BOOKMARK_MANAGER_TOAST_ITEMS_DELETED); 189 "toastItemsDeleted", IDS_MD_BOOKMARK_MANAGER_TOAST_ITEMS_DELETED);
190 plural_string_handler->AddLocalizedString(
191 "toastItemsCopied", IDS_MD_BOOKMARK_MANAGER_TOAST_ITEMS_COPIED);
190 web_ui->AddMessageHandler(std::move(plural_string_handler)); 192 web_ui->AddMessageHandler(std::move(plural_string_handler));
191 193
192 web_ui->AddMessageHandler(base::MakeUnique<BookmarksMessageHandler>()); 194 web_ui->AddMessageHandler(base::MakeUnique<BookmarksMessageHandler>());
193 } 195 }
194 196
195 // static 197 // static
196 bool MdBookmarksUI::IsEnabled() { 198 bool MdBookmarksUI::IsEnabled() {
197 return base::FeatureList::IsEnabled(features::kMaterialDesignBookmarks); 199 return base::FeatureList::IsEnabled(features::kMaterialDesignBookmarks);
198 } 200 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/toast_manager.html ('k') | chrome/test/data/webui/md_bookmarks/command_manager_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698