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

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

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: fix android Created 6 years, 2 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/ui/webui/flash_ui.cc ('k') | chrome/browser/ui/webui/help/help_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 weak_ptr_factory_.GetWeakPtr())); 287 weak_ptr_factory_.GetWeakPtr()));
288 } 288 }
289 289
290 } // namespace 290 } // namespace
291 291
292 GCMInternalsUI::GCMInternalsUI(content::WebUI* web_ui) 292 GCMInternalsUI::GCMInternalsUI(content::WebUI* web_ui)
293 : content::WebUIController(web_ui) { 293 : content::WebUIController(web_ui) {
294 // Set up the chrome://gcm-internals source. 294 // Set up the chrome://gcm-internals source.
295 content::WebUIDataSource* html_source = 295 content::WebUIDataSource* html_source =
296 content::WebUIDataSource::Create(chrome::kChromeUIGCMInternalsHost); 296 content::WebUIDataSource::Create(chrome::kChromeUIGCMInternalsHost);
297 html_source->SetUseJsonJSFormatV2();
298 297
299 html_source->SetJsonPath("strings.js"); 298 html_source->SetJsonPath("strings.js");
300 299
301 // Add required resources. 300 // Add required resources.
302 html_source->AddResourcePath("gcm_internals.css", IDR_GCM_INTERNALS_CSS); 301 html_source->AddResourcePath("gcm_internals.css", IDR_GCM_INTERNALS_CSS);
303 html_source->AddResourcePath("gcm_internals.js", IDR_GCM_INTERNALS_JS); 302 html_source->AddResourcePath("gcm_internals.js", IDR_GCM_INTERNALS_JS);
304 html_source->SetDefaultResource(IDR_GCM_INTERNALS_HTML); 303 html_source->SetDefaultResource(IDR_GCM_INTERNALS_HTML);
305 304
306 Profile* profile = Profile::FromWebUI(web_ui); 305 Profile* profile = Profile::FromWebUI(web_ui);
307 content::WebUIDataSource::Add(profile, html_source); 306 content::WebUIDataSource::Add(profile, html_source);
308 307
309 web_ui->AddMessageHandler(new GcmInternalsUIMessageHandler()); 308 web_ui->AddMessageHandler(new GcmInternalsUIMessageHandler());
310 } 309 }
311 310
312 GCMInternalsUI::~GCMInternalsUI() {} 311 GCMInternalsUI::~GCMInternalsUI() {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/flash_ui.cc ('k') | chrome/browser/ui/webui/help/help_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698