OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/gcm_internals_ui.h" | 5 #include "chrome/browser/ui/webui/gcm_internals_ui.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 content::WebUIDataSource::Create(chrome::kChromeUIGCMInternalsHost); | 161 content::WebUIDataSource::Create(chrome::kChromeUIGCMInternalsHost); |
162 | 162 |
163 html_source->SetJsonPath("strings.js"); | 163 html_source->SetJsonPath("strings.js"); |
164 | 164 |
165 // Add required resources. | 165 // Add required resources. |
166 html_source->AddResourcePath(gcm_driver::kGcmInternalsCSS, | 166 html_source->AddResourcePath(gcm_driver::kGcmInternalsCSS, |
167 IDR_GCM_DRIVER_GCM_INTERNALS_CSS); | 167 IDR_GCM_DRIVER_GCM_INTERNALS_CSS); |
168 html_source->AddResourcePath(gcm_driver::kGcmInternalsJS, | 168 html_source->AddResourcePath(gcm_driver::kGcmInternalsJS, |
169 IDR_GCM_DRIVER_GCM_INTERNALS_JS); | 169 IDR_GCM_DRIVER_GCM_INTERNALS_JS); |
170 html_source->SetDefaultResource(IDR_GCM_DRIVER_GCM_INTERNALS_HTML); | 170 html_source->SetDefaultResource(IDR_GCM_DRIVER_GCM_INTERNALS_HTML); |
| 171 html_source->DisableI18nAndUseGzipForAllPaths(); |
171 | 172 |
172 Profile* profile = Profile::FromWebUI(web_ui); | 173 Profile* profile = Profile::FromWebUI(web_ui); |
173 content::WebUIDataSource::Add(profile, html_source); | 174 content::WebUIDataSource::Add(profile, html_source); |
174 | 175 |
175 web_ui->AddMessageHandler(new GcmInternalsUIMessageHandler()); | 176 web_ui->AddMessageHandler(new GcmInternalsUIMessageHandler()); |
176 } | 177 } |
177 | 178 |
178 GCMInternalsUI::~GCMInternalsUI() {} | 179 GCMInternalsUI::~GCMInternalsUI() {} |
OLD | NEW |