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

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

Issue 1883523002: chrome://snippets-internals page for debugging NTP snippets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit tests Created 4 years, 8 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 2015 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 "snippets_internals_ui.h"
Marc Treib 2016/04/13 08:45:51 Full paths in includes, always. Also for the messa
jkrcal 2016/04/14 15:27:00 Done.
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/common/url_constants.h"
9 #include "content/public/browser/web_ui.h"
10 #include "content/public/browser/web_ui_data_source.h"
11 #include "grit/browser_resources.h"
12 #include "snippets_internals_message_handler.h"
13
14 namespace {
15
16 content::WebUIDataSource* CreateSnippetsInternalsHTMLSource() {
17 content::WebUIDataSource* source =
18 content::WebUIDataSource::Create(chrome::kChromeUISnippetsInternalsHost);
19
20 source->AddResourcePath("snippets_internals.js", IDR_SNIPPETS_INTERNALS_JS);
21 source->AddResourcePath("snippets_internals.css", IDR_SNIPPETS_INTERNALS_CSS);
22 source->SetDefaultResource(IDR_SNIPPETS_INTERNALS_HTML);
23 return source;
24 }
25
26 } // namespace
27
28 SnippetsInternalsUI::SnippetsInternalsUI(content::WebUI* web_ui)
29 : WebUIController(web_ui) {
30 Profile* profile = Profile::FromWebUI(web_ui);
31 content::WebUIDataSource::Add(profile, CreateSnippetsInternalsHTMLSource());
32
33 web_ui->AddMessageHandler(new SnippetsInternalsMessageHandler);
34 }
35
36 SnippetsInternalsUI::~SnippetsInternalsUI() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698