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

Side by Side Diff: ui/oobe/oobe_ui.cc

Issue 941973003: New OOBE implementation skeleton using WUG toolkit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Builds with gn using is_component_build=false. Created 5 years, 10 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 "content/public/browser/web_contents.h"
6 #include "content/public/browser/web_ui_data_source.h"
7 #include "grit/oobe_ui_resources.h"
8 #include "ui/oobe/declarations/oobe_web_ui_view.h"
9 #include "ui/oobe/oobe_ui.h"
10
11 namespace {
12
13 void SetUpDataSource(content::WebUIDataSource* source) {
14 source->SetJsonPath("strings.js");
15 source->AddResourcePath("", IDR_OOBE_UI_HTML);
16 source->AddResourcePath("oobe_ui.js", IDR_OOBE_UI_JS);
17 source->AddResourcePath("oobe-element.html", IDR_OOBE_UI_OOBE_ELEMENT_HTML);
18 source->AddResourcePath("oobe-element.js", IDR_OOBE_UI_OOBE_ELEMENT_JS);
19 }
20
21 } // namespace
22
23 OobeMdUI::OobeMdUI(content::WebUI* web_ui, const std::string& host)
24 : WebUIController(web_ui) {
25 content::WebUIDataSource* source = content::WebUIDataSource::Create(host);
26 SetUpDataSource(source);
27
28 view_.reset(new gen::OobeWebUIView(web_ui));
29 view_->Init();
30 view_->SetUpDataSource(source);
31
32 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(),
33 source);
34 }
35
36 OobeMdUI::~OobeMdUI() {
37 }
OLDNEW
« ui/oobe/OWNERS ('K') | « ui/oobe/oobe_ui.h ('k') | ui/oobe/oobe_ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698