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

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

Issue 2823053003: [MD Bookmarks] Remove the bookmarks-sidebar element. (Closed)
Patch Set: rebase, address comments 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 source->AddResourcePath("list.html", IDR_MD_BOOKMARKS_LIST_HTML); 95 source->AddResourcePath("list.html", IDR_MD_BOOKMARKS_LIST_HTML);
96 source->AddResourcePath("list.js", IDR_MD_BOOKMARKS_LIST_JS); 96 source->AddResourcePath("list.js", IDR_MD_BOOKMARKS_LIST_JS);
97 source->AddResourcePath("reducers.html", IDR_MD_BOOKMARKS_REDUCERS_HTML); 97 source->AddResourcePath("reducers.html", IDR_MD_BOOKMARKS_REDUCERS_HTML);
98 source->AddResourcePath("reducers.js", IDR_MD_BOOKMARKS_REDUCERS_JS); 98 source->AddResourcePath("reducers.js", IDR_MD_BOOKMARKS_REDUCERS_JS);
99 source->AddResourcePath("router.html", IDR_MD_BOOKMARKS_ROUTER_HTML); 99 source->AddResourcePath("router.html", IDR_MD_BOOKMARKS_ROUTER_HTML);
100 source->AddResourcePath("router.js", IDR_MD_BOOKMARKS_ROUTER_JS); 100 source->AddResourcePath("router.js", IDR_MD_BOOKMARKS_ROUTER_JS);
101 source->AddResourcePath("shared_style.html", 101 source->AddResourcePath("shared_style.html",
102 IDR_MD_BOOKMARKS_SHARED_STYLE_HTML); 102 IDR_MD_BOOKMARKS_SHARED_STYLE_HTML);
103 source->AddResourcePath("shared_vars.html", 103 source->AddResourcePath("shared_vars.html",
104 IDR_MD_BOOKMARKS_SHARED_VARS_HTML); 104 IDR_MD_BOOKMARKS_SHARED_VARS_HTML);
105 source->AddResourcePath("sidebar.html", IDR_MD_BOOKMARKS_SIDEBAR_HTML);
106 source->AddResourcePath("sidebar.js", IDR_MD_BOOKMARKS_SIDEBAR_JS);
107 source->AddResourcePath("store.html", IDR_MD_BOOKMARKS_STORE_HTML); 105 source->AddResourcePath("store.html", IDR_MD_BOOKMARKS_STORE_HTML);
108 source->AddResourcePath("store.js", IDR_MD_BOOKMARKS_STORE_JS); 106 source->AddResourcePath("store.js", IDR_MD_BOOKMARKS_STORE_JS);
109 source->AddResourcePath("store_client.html", 107 source->AddResourcePath("store_client.html",
110 IDR_MD_BOOKMARKS_STORE_CLIENT_HTML); 108 IDR_MD_BOOKMARKS_STORE_CLIENT_HTML);
111 source->AddResourcePath("store_client.js", IDR_MD_BOOKMARKS_STORE_CLIENT_JS); 109 source->AddResourcePath("store_client.js", IDR_MD_BOOKMARKS_STORE_CLIENT_JS);
112 source->AddResourcePath("toolbar.html", IDR_MD_BOOKMARKS_TOOLBAR_HTML); 110 source->AddResourcePath("toolbar.html", IDR_MD_BOOKMARKS_TOOLBAR_HTML);
113 source->AddResourcePath("toolbar.js", IDR_MD_BOOKMARKS_TOOLBAR_JS); 111 source->AddResourcePath("toolbar.js", IDR_MD_BOOKMARKS_TOOLBAR_JS);
114 source->AddResourcePath("util.html", IDR_MD_BOOKMARKS_UTIL_HTML); 112 source->AddResourcePath("util.html", IDR_MD_BOOKMARKS_UTIL_HTML);
115 source->AddResourcePath("util.js", IDR_MD_BOOKMARKS_UTIL_JS); 113 source->AddResourcePath("util.js", IDR_MD_BOOKMARKS_UTIL_JS);
116 source->SetDefaultResource(IDR_MD_BOOKMARKS_BOOKMARKS_HTML); 114 source->SetDefaultResource(IDR_MD_BOOKMARKS_BOOKMARKS_HTML);
117 source->SetJsonPath("strings.js"); 115 source->SetJsonPath("strings.js");
118 116
119 return source; 117 return source;
120 } 118 }
121 119
122 } // namespace 120 } // namespace
123 121
124 MdBookmarksUI::MdBookmarksUI(content::WebUI* web_ui) : WebUIController(web_ui) { 122 MdBookmarksUI::MdBookmarksUI(content::WebUI* web_ui) : WebUIController(web_ui) {
125 // Set up the chrome://bookmarks/ source. 123 // Set up the chrome://bookmarks/ source.
126 Profile* profile = Profile::FromWebUI(web_ui); 124 Profile* profile = Profile::FromWebUI(web_ui);
127 content::WebUIDataSource::Add(profile, 125 content::WebUIDataSource::Add(profile,
128 CreateMdBookmarksUIHTMLSource(profile)); 126 CreateMdBookmarksUIHTMLSource(profile));
129 } 127 }
130 128
131 // static 129 // static
132 bool MdBookmarksUI::IsEnabled() { 130 bool MdBookmarksUI::IsEnabled() {
133 return base::FeatureList::IsEnabled(features::kMaterialDesignBookmarks); 131 return base::FeatureList::IsEnabled(features::kMaterialDesignBookmarks);
134 } 132 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/sidebar.js ('k') | chrome/test/data/webui/md_bookmarks/app_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698