| OLD | NEW |
| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 source->AddResourcePath("router.js", IDR_MD_BOOKMARKS_ROUTER_JS); | 137 source->AddResourcePath("router.js", IDR_MD_BOOKMARKS_ROUTER_JS); |
| 138 source->AddResourcePath("shared_style.html", | 138 source->AddResourcePath("shared_style.html", |
| 139 IDR_MD_BOOKMARKS_SHARED_STYLE_HTML); | 139 IDR_MD_BOOKMARKS_SHARED_STYLE_HTML); |
| 140 source->AddResourcePath("shared_vars.html", | 140 source->AddResourcePath("shared_vars.html", |
| 141 IDR_MD_BOOKMARKS_SHARED_VARS_HTML); | 141 IDR_MD_BOOKMARKS_SHARED_VARS_HTML); |
| 142 source->AddResourcePath("store.html", IDR_MD_BOOKMARKS_STORE_HTML); | 142 source->AddResourcePath("store.html", IDR_MD_BOOKMARKS_STORE_HTML); |
| 143 source->AddResourcePath("store.js", IDR_MD_BOOKMARKS_STORE_JS); | 143 source->AddResourcePath("store.js", IDR_MD_BOOKMARKS_STORE_JS); |
| 144 source->AddResourcePath("store_client.html", | 144 source->AddResourcePath("store_client.html", |
| 145 IDR_MD_BOOKMARKS_STORE_CLIENT_HTML); | 145 IDR_MD_BOOKMARKS_STORE_CLIENT_HTML); |
| 146 source->AddResourcePath("store_client.js", IDR_MD_BOOKMARKS_STORE_CLIENT_JS); | 146 source->AddResourcePath("store_client.js", IDR_MD_BOOKMARKS_STORE_CLIENT_JS); |
| 147 source->AddResourcePath("timer_proxy.html", |
| 148 IDR_MD_BOOKMARKS_TIMER_PROXY_HTML); |
| 149 source->AddResourcePath("timer_proxy.js", IDR_MD_BOOKMARKS_TIMER_PROXY_JS); |
| 147 source->AddResourcePath("toast_manager.html", | 150 source->AddResourcePath("toast_manager.html", |
| 148 IDR_MD_BOOKMARKS_TOAST_MANAGER_HTML); | 151 IDR_MD_BOOKMARKS_TOAST_MANAGER_HTML); |
| 149 source->AddResourcePath("toast_manager.js", | 152 source->AddResourcePath("toast_manager.js", |
| 150 IDR_MD_BOOKMARKS_TOAST_MANAGER_JS); | 153 IDR_MD_BOOKMARKS_TOAST_MANAGER_JS); |
| 151 source->AddResourcePath("toolbar.html", IDR_MD_BOOKMARKS_TOOLBAR_HTML); | 154 source->AddResourcePath("toolbar.html", IDR_MD_BOOKMARKS_TOOLBAR_HTML); |
| 152 source->AddResourcePath("toolbar.js", IDR_MD_BOOKMARKS_TOOLBAR_JS); | 155 source->AddResourcePath("toolbar.js", IDR_MD_BOOKMARKS_TOOLBAR_JS); |
| 153 source->AddResourcePath("util.html", IDR_MD_BOOKMARKS_UTIL_HTML); | 156 source->AddResourcePath("util.html", IDR_MD_BOOKMARKS_UTIL_HTML); |
| 154 source->AddResourcePath("util.js", IDR_MD_BOOKMARKS_UTIL_JS); | 157 source->AddResourcePath("util.js", IDR_MD_BOOKMARKS_UTIL_JS); |
| 155 | 158 |
| 156 source->SetDefaultResource(IDR_MD_BOOKMARKS_BOOKMARKS_HTML); | 159 source->SetDefaultResource(IDR_MD_BOOKMARKS_BOOKMARKS_HTML); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 174 "toastItemsDeleted", IDS_MD_BOOKMARK_MANAGER_TOAST_ITEMS_DELETED); | 177 "toastItemsDeleted", IDS_MD_BOOKMARK_MANAGER_TOAST_ITEMS_DELETED); |
| 175 web_ui->AddMessageHandler(std::move(plural_string_handler)); | 178 web_ui->AddMessageHandler(std::move(plural_string_handler)); |
| 176 | 179 |
| 177 web_ui->AddMessageHandler(base::MakeUnique<BookmarksMessageHandler>()); | 180 web_ui->AddMessageHandler(base::MakeUnique<BookmarksMessageHandler>()); |
| 178 } | 181 } |
| 179 | 182 |
| 180 // static | 183 // static |
| 181 bool MdBookmarksUI::IsEnabled() { | 184 bool MdBookmarksUI::IsEnabled() { |
| 182 return base::FeatureList::IsEnabled(features::kMaterialDesignBookmarks); | 185 return base::FeatureList::IsEnabled(features::kMaterialDesignBookmarks); |
| 183 } | 186 } |
| OLD | NEW |