| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/history_ui.h" | 5 #include "chrome/browser/ui/webui/history_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 search::IsInstantExtendedAPIEnabled()); | 158 search::IsInstantExtendedAPIEnabled()); |
| 159 source->AddBoolean("isSupervisedProfile", profile->IsSupervised()); | 159 source->AddBoolean("isSupervisedProfile", profile->IsSupervised()); |
| 160 source->AddBoolean("hideDeleteVisitUI", | 160 source->AddBoolean("hideDeleteVisitUI", |
| 161 profile->IsSupervised() && !allow_deleting_history); | 161 profile->IsSupervised() && !allow_deleting_history); |
| 162 | 162 |
| 163 source->SetJsonPath(kStringsJsFile); | 163 source->SetJsonPath(kStringsJsFile); |
| 164 source->AddResourcePath(kHistoryJsFile, IDR_HISTORY_JS); | 164 source->AddResourcePath(kHistoryJsFile, IDR_HISTORY_JS); |
| 165 source->AddResourcePath(kOtherDevicesJsFile, IDR_OTHER_DEVICES_JS); | 165 source->AddResourcePath(kOtherDevicesJsFile, IDR_OTHER_DEVICES_JS); |
| 166 source->SetDefaultResource(IDR_HISTORY_HTML); | 166 source->SetDefaultResource(IDR_HISTORY_HTML); |
| 167 source->DisableDenyXFrameOptions(); | 167 source->DisableDenyXFrameOptions(); |
| 168 source->DisableI18nAndUseGzipForAllPaths(); |
| 168 | 169 |
| 169 return source; | 170 return source; |
| 170 } | 171 } |
| 171 | 172 |
| 172 } // namespace | 173 } // namespace |
| 173 | 174 |
| 174 HistoryUI::HistoryUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 175 HistoryUI::HistoryUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| 175 web_ui->AddMessageHandler(new BrowsingHistoryHandler()); | 176 web_ui->AddMessageHandler(new BrowsingHistoryHandler()); |
| 176 web_ui->AddMessageHandler(new MetricsHandler()); | 177 web_ui->AddMessageHandler(new MetricsHandler()); |
| 177 | 178 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 203 } | 204 } |
| 204 | 205 |
| 205 HistoryUI::~HistoryUI() {} | 206 HistoryUI::~HistoryUI() {} |
| 206 | 207 |
| 207 // static | 208 // static |
| 208 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes( | 209 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes( |
| 209 ui::ScaleFactor scale_factor) { | 210 ui::ScaleFactor scale_factor) { |
| 210 return ResourceBundle::GetSharedInstance(). | 211 return ResourceBundle::GetSharedInstance(). |
| 211 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor); | 212 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor); |
| 212 } | 213 } |
| OLD | NEW |