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

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: Rebase 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 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 MdBookmarksUI::MdBookmarksUI(content::WebUI* web_ui) : WebUIController(web_ui) { 175 MdBookmarksUI::MdBookmarksUI(content::WebUI* web_ui) : WebUIController(web_ui) {
176 // Set up the chrome://bookmarks/ source. 176 // Set up the chrome://bookmarks/ source.
177 Profile* profile = Profile::FromWebUI(web_ui); 177 Profile* profile = Profile::FromWebUI(web_ui);
178 content::WebUIDataSource::Add(profile, 178 content::WebUIDataSource::Add(profile,
179 CreateMdBookmarksUIHTMLSource(profile)); 179 CreateMdBookmarksUIHTMLSource(profile));
180 180
181 auto plural_string_handler = base::MakeUnique<PluralStringHandler>(); 181 auto plural_string_handler = base::MakeUnique<PluralStringHandler>();
182 plural_string_handler->AddLocalizedString( 182 plural_string_handler->AddLocalizedString(
183 "toastItemsDeleted", IDS_MD_BOOKMARK_MANAGER_TOAST_ITEMS_DELETED); 183 "toastItemsDeleted", IDS_MD_BOOKMARK_MANAGER_TOAST_ITEMS_DELETED);
184 plural_string_handler->AddLocalizedString(
185 "toastItemsCopied", IDS_MD_BOOKMARK_MANAGER_TOAST_ITEMS_COPIED);
184 web_ui->AddMessageHandler(std::move(plural_string_handler)); 186 web_ui->AddMessageHandler(std::move(plural_string_handler));
185 187
186 web_ui->AddMessageHandler(base::MakeUnique<BookmarksMessageHandler>()); 188 web_ui->AddMessageHandler(base::MakeUnique<BookmarksMessageHandler>());
187 } 189 }
188 190
189 // static 191 // static
190 bool MdBookmarksUI::IsEnabled() { 192 bool MdBookmarksUI::IsEnabled() {
191 return base::FeatureList::IsEnabled(features::kMaterialDesignBookmarks); 193 return base::FeatureList::IsEnabled(features::kMaterialDesignBookmarks);
192 } 194 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698