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

Side by Side Diff: chrome/browser/ui/webui/md_history_ui.cc

Issue 1607403004: MD History: Display synced tabs history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@second_patch
Patch Set: Merged but tests not working everything else SEEMS ok 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
« no previous file with comments | « chrome/browser/resources/md_history/synced_device_manager.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 21 matching lines...) Expand all
32 PrefService* prefs = profile->GetPrefs(); 32 PrefService* prefs = profile->GetPrefs();
33 33
34 content::WebUIDataSource* source = 34 content::WebUIDataSource* source =
35 content::WebUIDataSource::Create(chrome::kChromeUIHistoryHost); 35 content::WebUIDataSource::Create(chrome::kChromeUIHistoryHost);
36 36
37 // Localized strings (alphabetical order). 37 // Localized strings (alphabetical order).
38 source->AddLocalizedString("clearBrowsingData", 38 source->AddLocalizedString("clearBrowsingData",
39 IDS_CLEAR_BROWSING_DATA_TITLE); 39 IDS_CLEAR_BROWSING_DATA_TITLE);
40 source->AddLocalizedString("clearSearch", IDS_MD_HISTORY_CLEAR_SEARCH); 40 source->AddLocalizedString("clearSearch", IDS_MD_HISTORY_CLEAR_SEARCH);
41 source->AddLocalizedString("cancel", IDS_CANCEL); 41 source->AddLocalizedString("cancel", IDS_CANCEL);
42 source->AddLocalizedString("clearSearch", IDS_MD_HISTORY_CLEAR_SEARCH);
43 source->AddLocalizedString("clearSearch", IDS_MD_HISTORY_CLEAR_SEARCH);
42 source->AddLocalizedString("delete", IDS_MD_HISTORY_DELETE); 44 source->AddLocalizedString("delete", IDS_MD_HISTORY_DELETE);
43 source->AddLocalizedString("itemsSelected", IDS_MD_HISTORY_ITEMS_SELECTED); 45 source->AddLocalizedString("itemsSelected", IDS_MD_HISTORY_ITEMS_SELECTED);
44 source->AddLocalizedString("moreFromSite", IDS_HISTORY_MORE_FROM_SITE); 46 source->AddLocalizedString("moreFromSite", IDS_HISTORY_MORE_FROM_SITE);
47 source->AddLocalizedString("moreFromSite", IDS_HISTORY_MORE_FROM_SITE);
48 source->AddLocalizedString("openAll", IDS_HISTORY_OTHER_SESSIONS_OPEN_ALL);
45 source->AddLocalizedString("removeFromHistory", IDS_HISTORY_REMOVE_PAGE); 49 source->AddLocalizedString("removeFromHistory", IDS_HISTORY_REMOVE_PAGE);
50 source->AddLocalizedString("removeFromHistory", IDS_HISTORY_REMOVE_PAGE);
51 source->AddLocalizedString("search", IDS_MD_HISTORY_SEARCH);
46 source->AddLocalizedString("search", IDS_MD_HISTORY_SEARCH); 52 source->AddLocalizedString("search", IDS_MD_HISTORY_SEARCH);
47 source->AddLocalizedString("title", IDS_HISTORY_TITLE); 53 source->AddLocalizedString("title", IDS_HISTORY_TITLE);
48 54
49 bool allow_deleting_history = 55 bool allow_deleting_history =
50 prefs->GetBoolean(prefs::kAllowDeletingBrowserHistory); 56 prefs->GetBoolean(prefs::kAllowDeletingBrowserHistory);
51 source->AddBoolean("allowDeletingHistory", allow_deleting_history); 57 source->AddBoolean("allowDeletingHistory", allow_deleting_history);
52 source->AddResourcePath("history_item.html", 58 source->AddResourcePath("history_item.html",
53 IDR_MD_HISTORY_HISTORY_ITEM_HTML); 59 IDR_MD_HISTORY_HISTORY_ITEM_HTML);
54 source->AddResourcePath("history_item.js", IDR_MD_HISTORY_HISTORY_ITEM_JS); 60 source->AddResourcePath("history_item.js", IDR_MD_HISTORY_HISTORY_ITEM_JS);
55 source->AddResourcePath("history_list.html", 61 source->AddResourcePath("history_list.html",
56 IDR_MD_HISTORY_HISTORY_LIST_HTML); 62 IDR_MD_HISTORY_HISTORY_LIST_HTML);
57 source->AddResourcePath("history_list.js", IDR_MD_HISTORY_HISTORY_LIST_JS); 63 source->AddResourcePath("history_list.js", IDR_MD_HISTORY_HISTORY_LIST_JS);
58 source->AddResourcePath("history_toolbar.html", 64 source->AddResourcePath("history_toolbar.html",
59 IDR_MD_HISTORY_HISTORY_TOOLBAR_HTML); 65 IDR_MD_HISTORY_HISTORY_TOOLBAR_HTML);
60 source->AddResourcePath("history_toolbar.js", 66 source->AddResourcePath("history_toolbar.js",
61 IDR_MD_HISTORY_HISTORY_TOOLBAR_JS); 67 IDR_MD_HISTORY_HISTORY_TOOLBAR_JS);
62 source->AddResourcePath("history.js", IDR_MD_HISTORY_HISTORY_JS); 68 source->AddResourcePath("history.js", IDR_MD_HISTORY_HISTORY_JS);
69 source->AddResourcePath("shared_style.html",
70 IDR_MD_HISTORY_SHARED_STYLE_HTML);
71 source->AddResourcePath("side_bar.html", IDR_MD_HISTORY_SIDE_BAR_HTML);
72 source->AddResourcePath("side_bar.js", IDR_MD_HISTORY_SIDE_BAR_JS);
73 source->AddResourcePath("synced_device_card.html",
74 IDR_MD_HISTORY_SYNCED_DEVICE_CARD_HTML);
75 source->AddResourcePath("synced_device_card.js",
76 IDR_MD_HISTORY_SYNCED_DEVICE_CARD_JS);
77 source->AddResourcePath("synced_device_manager.html",
78 IDR_MD_HISTORY_SYNCED_DEVICE_MANAGER_HTML);
79 source->AddResourcePath("synced_device_manager.js",
80 IDR_MD_HISTORY_SYNCED_DEVICE_MANAGER_JS);
63 81
64 source->SetDefaultResource(IDR_MD_HISTORY_HISTORY_HTML); 82 source->SetDefaultResource(IDR_MD_HISTORY_HISTORY_HTML);
65 source->SetJsonPath("strings.js"); 83 source->SetJsonPath("strings.js");
66 84
67 return source; 85 return source;
68 } 86 }
69 87
70 } // namespace 88 } // namespace
71 89
72 MdHistoryUI::MdHistoryUI(content::WebUI* web_ui) : WebUIController(web_ui) { 90 MdHistoryUI::MdHistoryUI(content::WebUI* web_ui) : WebUIController(web_ui) {
(...skipping 12 matching lines...) Expand all
85 content::WebUIDataSource::Add(profile, CreateMdHistoryUIHTMLSource(profile)); 103 content::WebUIDataSource::Add(profile, CreateMdHistoryUIHTMLSource(profile));
86 } 104 }
87 105
88 MdHistoryUI::~MdHistoryUI() {} 106 MdHistoryUI::~MdHistoryUI() {}
89 107
90 base::RefCountedMemory* MdHistoryUI::GetFaviconResourceBytes( 108 base::RefCountedMemory* MdHistoryUI::GetFaviconResourceBytes(
91 ui::ScaleFactor scale_factor) { 109 ui::ScaleFactor scale_factor) {
92 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( 110 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
93 IDR_HISTORY_FAVICON, scale_factor); 111 IDR_HISTORY_FAVICON, scale_factor);
94 } 112 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/synced_device_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698