| OLD | NEW |
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 IDR_MD_HISTORY_HISTORY_ITEM_HTML); | 53 IDR_MD_HISTORY_HISTORY_ITEM_HTML); |
| 54 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", | 55 source->AddResourcePath("history_list.html", |
| 56 IDR_MD_HISTORY_HISTORY_LIST_HTML); | 56 IDR_MD_HISTORY_HISTORY_LIST_HTML); |
| 57 source->AddResourcePath("history_list.js", IDR_MD_HISTORY_HISTORY_LIST_JS); | 57 source->AddResourcePath("history_list.js", IDR_MD_HISTORY_HISTORY_LIST_JS); |
| 58 source->AddResourcePath("history_toolbar.html", | 58 source->AddResourcePath("history_toolbar.html", |
| 59 IDR_MD_HISTORY_HISTORY_TOOLBAR_HTML); | 59 IDR_MD_HISTORY_HISTORY_TOOLBAR_HTML); |
| 60 source->AddResourcePath("history_toolbar.js", | 60 source->AddResourcePath("history_toolbar.js", |
| 61 IDR_MD_HISTORY_HISTORY_TOOLBAR_JS); | 61 IDR_MD_HISTORY_HISTORY_TOOLBAR_JS); |
| 62 source->AddResourcePath("history.js", IDR_MD_HISTORY_HISTORY_JS); | 62 source->AddResourcePath("history.js", IDR_MD_HISTORY_HISTORY_JS); |
| 63 source->AddResourcePath("shared_style.html", |
| 64 IDR_MD_HISTORY_SHARED_STYLE_HTML); |
| 63 | 65 |
| 64 source->SetDefaultResource(IDR_MD_HISTORY_HISTORY_HTML); | 66 source->SetDefaultResource(IDR_MD_HISTORY_HISTORY_HTML); |
| 65 source->SetJsonPath("strings.js"); | 67 source->SetJsonPath("strings.js"); |
| 66 | 68 |
| 67 return source; | 69 return source; |
| 68 } | 70 } |
| 69 | 71 |
| 70 } // namespace | 72 } // namespace |
| 71 | 73 |
| 72 MdHistoryUI::MdHistoryUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 74 MdHistoryUI::MdHistoryUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 85 content::WebUIDataSource::Add(profile, CreateMdHistoryUIHTMLSource(profile)); | 87 content::WebUIDataSource::Add(profile, CreateMdHistoryUIHTMLSource(profile)); |
| 86 } | 88 } |
| 87 | 89 |
| 88 MdHistoryUI::~MdHistoryUI() {} | 90 MdHistoryUI::~MdHistoryUI() {} |
| 89 | 91 |
| 90 base::RefCountedMemory* MdHistoryUI::GetFaviconResourceBytes( | 92 base::RefCountedMemory* MdHistoryUI::GetFaviconResourceBytes( |
| 91 ui::ScaleFactor scale_factor) { | 93 ui::ScaleFactor scale_factor) { |
| 92 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( | 94 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( |
| 93 IDR_HISTORY_FAVICON, scale_factor); | 95 IDR_HISTORY_FAVICON, scale_factor); |
| 94 } | 96 } |
| OLD | NEW |