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

Side by Side Diff: chrome/browser/ui/webui/task_scheduler_internals/task_scheduler_internals_ui.cc

Issue 2349623003: Add a Browser Task Scheduler Chrome Internals Page (Closed)
Patch Set: Remvoe allowexternalscript Created 4 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/webui/task_scheduler_internals/task_scheduler_intern als_ui.h"
6
7 #include "base/task_scheduler/task_scheduler.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/url_constants.h"
10 #include "chrome/grit/task_scheduler_internals_resources.h"
11 #include "content/public/browser/web_ui_data_source.h"
12
13 TaskSchedulerInternalsUI::TaskSchedulerInternalsUI(content::WebUI* web_ui)
14 : content::WebUIController(web_ui) {
15 content::WebUIDataSource* html_source =
16 content::WebUIDataSource::Create(
17 chrome::kChromeUITaskSchedulerInternalsHost);
18
19 html_source->AddString("status", base::TaskScheduler::GetInstance()
20 ? "Instantiated"
21 : "Not Instantiated");
22
23 html_source->SetDefaultResource(
24 IDR_TASK_SCHEDULER_INTERNALS_RESOURCES_INDEX_HTML);
25
26 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), html_source);
27 }
28
29 TaskSchedulerInternalsUI::~TaskSchedulerInternalsUI() = default;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698