| Index: ui/oobe/oobe_ui.cc
|
| diff --git a/ui/oobe/oobe_ui.cc b/ui/oobe/oobe_ui.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d31d1f3c6fca02f52f2b05908148c0bb8ad40139
|
| --- /dev/null
|
| +++ b/ui/oobe/oobe_ui.cc
|
| @@ -0,0 +1,37 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "content/public/browser/web_contents.h"
|
| +#include "content/public/browser/web_ui_data_source.h"
|
| +#include "grit/oobe_ui_resources.h"
|
| +#include "ui/oobe/declarations/oobe_web_ui_view.h"
|
| +#include "ui/oobe/oobe_ui.h"
|
| +
|
| +namespace {
|
| +
|
| +void SetUpDataSource(content::WebUIDataSource* source) {
|
| + source->SetJsonPath("strings.js");
|
| + source->AddResourcePath("", IDR_OOBE_UI_HTML);
|
| + source->AddResourcePath("oobe_ui.js", IDR_OOBE_UI_JS);
|
| + source->AddResourcePath("oobe-element.html", IDR_OOBE_UI_OOBE_ELEMENT_HTML);
|
| + source->AddResourcePath("oobe-element.js", IDR_OOBE_UI_OOBE_ELEMENT_JS);
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| +OobeMdUI::OobeMdUI(content::WebUI* web_ui, const std::string& host)
|
| + : WebUIController(web_ui) {
|
| + content::WebUIDataSource* source = content::WebUIDataSource::Create(host);
|
| + SetUpDataSource(source);
|
| +
|
| + view_.reset(new gen::OobeWebUIView(web_ui));
|
| + view_->Init();
|
| + view_->SetUpDataSource(source);
|
| +
|
| + content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(),
|
| + source);
|
| +}
|
| +
|
| +OobeMdUI::~OobeMdUI() {
|
| +}
|
|
|