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 "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 |
| 13 using content::WebContents; |
| 14 using content::WebUIMessageHandler; |
| 15 |
| 16 namespace chromeos { |
| 17 |
| 18 HatsUI::HatsUI(content::WebUI* web_ui) |
| 19 : WebDialogUI(web_ui) { |
| 20 content::WebUIDataSource* source = |
| 21 content::WebUIDataSource::Create(chrome::kChromeUIHatsHost); |
| 22 |
| 23 source->SetDefaultResource(IDR_HATS_HTML); |
| 24 source->DisableContentSecurityPolicy(); |
| 25 |
| 26 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source); |
| 27 } |
| 28 |
| 29 HatsUI::~HatsUI() {} |
| 30 |
| 31 } // namespace chromeos |
OLD | NEW |