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_history_ui.cc

Issue 1641543002: MD History: Refactored design for displaying history information (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@second_patch
Patch Set: closure Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_history_ui.h" 5 #include "chrome/browser/ui/webui/md_history_ui.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/webui/browsing_history_handler.h" 9 #include "chrome/browser/ui/webui/browsing_history_handler.h"
10 #include "chrome/browser/ui/webui/metrics_handler.h" 10 #include "chrome/browser/ui/webui/metrics_handler.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 source->AddLocalizedString("delete", IDS_MD_HISTORY_DELETE); 42 source->AddLocalizedString("delete", IDS_MD_HISTORY_DELETE);
43 source->AddLocalizedString("itemsSelected", IDS_MD_HISTORY_ITEMS_SELECTED); 43 source->AddLocalizedString("itemsSelected", IDS_MD_HISTORY_ITEMS_SELECTED);
44 source->AddLocalizedString("moreFromSite", IDS_HISTORY_MORE_FROM_SITE); 44 source->AddLocalizedString("moreFromSite", IDS_HISTORY_MORE_FROM_SITE);
45 source->AddLocalizedString("removeFromHistory", IDS_HISTORY_REMOVE_PAGE); 45 source->AddLocalizedString("removeFromHistory", IDS_HISTORY_REMOVE_PAGE);
46 source->AddLocalizedString("search", IDS_MD_HISTORY_SEARCH); 46 source->AddLocalizedString("search", IDS_MD_HISTORY_SEARCH);
47 source->AddLocalizedString("title", IDS_HISTORY_TITLE); 47 source->AddLocalizedString("title", IDS_HISTORY_TITLE);
48 48
49 bool allow_deleting_history = 49 bool allow_deleting_history =
50 prefs->GetBoolean(prefs::kAllowDeletingBrowserHistory); 50 prefs->GetBoolean(prefs::kAllowDeletingBrowserHistory);
51 source->AddBoolean("allowDeletingHistory", allow_deleting_history); 51 source->AddBoolean("allowDeletingHistory", allow_deleting_history);
52
53 source->AddResourcePath("history_card.html",
54 IDR_MD_HISTORY_HISTORY_CARD_HTML);
55 source->AddResourcePath("history_card.js", IDR_MD_HISTORY_HISTORY_CARD_JS);
56 source->AddResourcePath("history_card_manager.html",
57 IDR_MD_HISTORY_HISTORY_CARD_MANAGER_HTML);
58 source->AddResourcePath("history_card_manager.js",
59 IDR_MD_HISTORY_HISTORY_CARD_MANAGER_JS);
60 source->AddResourcePath("history_item.html", 52 source->AddResourcePath("history_item.html",
61 IDR_MD_HISTORY_HISTORY_ITEM_HTML); 53 IDR_MD_HISTORY_HISTORY_ITEM_HTML);
62 source->AddResourcePath("history_item.js", IDR_MD_HISTORY_HISTORY_ITEM_JS); 54 source->AddResourcePath("history_item.js", IDR_MD_HISTORY_HISTORY_ITEM_JS);
55 source->AddResourcePath("history_list.html",
56 IDR_MD_HISTORY_HISTORY_LIST_HTML);
57 source->AddResourcePath("history_list.js", IDR_MD_HISTORY_HISTORY_LIST_JS);
63 source->AddResourcePath("history_toolbar.html", 58 source->AddResourcePath("history_toolbar.html",
64 IDR_MD_HISTORY_HISTORY_TOOLBAR_HTML); 59 IDR_MD_HISTORY_HISTORY_TOOLBAR_HTML);
65 source->AddResourcePath("history_toolbar.js", 60 source->AddResourcePath("history_toolbar.js",
66 IDR_MD_HISTORY_HISTORY_TOOLBAR_JS); 61 IDR_MD_HISTORY_HISTORY_TOOLBAR_JS);
67 source->AddResourcePath("history.js", IDR_MD_HISTORY_HISTORY_JS); 62 source->AddResourcePath("history.js", IDR_MD_HISTORY_HISTORY_JS);
68 63
69 source->SetDefaultResource(IDR_MD_HISTORY_HISTORY_HTML); 64 source->SetDefaultResource(IDR_MD_HISTORY_HISTORY_HTML);
70 source->SetJsonPath("strings.js"); 65 source->SetJsonPath("strings.js");
71 66
72 return source; 67 return source;
(...skipping 17 matching lines...) Expand all
90 content::WebUIDataSource::Add(profile, CreateMdHistoryUIHTMLSource(profile)); 85 content::WebUIDataSource::Add(profile, CreateMdHistoryUIHTMLSource(profile));
91 } 86 }
92 87
93 MdHistoryUI::~MdHistoryUI() {} 88 MdHistoryUI::~MdHistoryUI() {}
94 89
95 base::RefCountedMemory* MdHistoryUI::GetFaviconResourceBytes( 90 base::RefCountedMemory* MdHistoryUI::GetFaviconResourceBytes(
96 ui::ScaleFactor scale_factor) { 91 ui::ScaleFactor scale_factor) {
97 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( 92 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
98 IDR_HISTORY_FAVICON, scale_factor); 93 IDR_HISTORY_FAVICON, scale_factor);
99 } 94 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/history_list.js ('k') | chrome/test/data/webui/md_history/history_card_manager_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698