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

Side by Side Diff: chrome/browser/ui/webui/memory_internals/memory_internals_ui.cc

Issue 1722493002: Project Eraser: Kill chrome://memory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chrome_browser_ui.gypi. Created 4 years, 9 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 (c) 2013 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/memory_internals/memory_internals_ui.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/webui/memory_internals/memory_internals_handler.h"
9 #include "chrome/common/url_constants.h"
10 #include "content/public/browser/web_ui.h"
11 #include "content/public/browser/web_ui_data_source.h"
12 #include "grit/memory_internals_resources.h"
13
14 namespace {
15
16 content::WebUIDataSource* CreateMemoryInternalsHTMLSource() {
17 content::WebUIDataSource* source =
18 content::WebUIDataSource::Create(chrome::kChromeUIMemoryInternalsHost);
19
20 source->AddResourcePath("memory_internals.js",
21 IDR_MEMORY_INTERNALS_MEMORY_INTERNALS_JS);
22 source->SetDefaultResource(IDR_MEMORY_INTERNALS_MEMORY_INTERNALS_HTML);
23 return source;
24 }
25
26 } // namespace
27
28 MemoryInternalsUI::MemoryInternalsUI(content::WebUI* web_ui)
29 : WebUIController(web_ui) {
30 web_ui->AddMessageHandler(new MemoryInternalsHandler());
31
32 // Set up the chrome://memory-internals/ source.
33 Profile* profile = Profile::FromWebUI(web_ui);
34 content::WebUIDataSource::Add(profile, CreateMemoryInternalsHTMLSource());
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698