Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 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/chromeos/hats/hats_ui.h" | |
| 6 | |
| 7 #include "base/values.h" | |
|
xiyuan
2016/06/10 16:08:29
nit: not used?
malaykeshav
2016/06/10 17:52:19
done
| |
| 8 #include "chrome/browser/profiles/profile.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/browser_resources.h" | |
| 13 | |
| 14 using content::WebContents; | |
| 15 using content::WebUIMessageHandler; | |
| 16 | |
| 17 namespace chromeos { | |
| 18 | |
| 19 HatsUI::HatsUI(content::WebUI* web_ui) | |
| 20 : WebDialogUI(web_ui) { | |
| 21 content::WebUIDataSource* source = | |
| 22 content::WebUIDataSource::Create(chrome::kChromeUIHatsHost); | |
| 23 | |
| 24 source->SetDefaultResource(IDR_HATS_HTML); | |
| 25 source->DisableContentSecurityPolicy(); | |
| 26 | |
| 27 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source); | |
| 28 } | |
| 29 | |
| 30 HatsUI::~HatsUI() {} | |
| 31 | |
| 32 } // namespace chromeos | |
| OLD | NEW |