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

Unified Diff: chrome/browser/ui/webui/demo_ui/demo.cc

Issue 925333002: Demo UI made with a help of WUG toolkit (DO NOT SEND TO CQ). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/demo_ui/demo.h ('k') | chrome/browser/ui/webui/demo_ui/demo_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/demo_ui/demo.cc
diff --git a/chrome/browser/ui/webui/demo_ui/demo.cc b/chrome/browser/ui/webui/demo_ui/demo.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7405a47390645d4d401c5b50749094a41e77f06d
--- /dev/null
+++ b/chrome/browser/ui/webui/demo_ui/demo.cc
@@ -0,0 +1,25 @@
+// 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 "chrome/browser/ui/webui/demo_ui/demo.h"
+
+#include "chrome/browser/profiles/profile.h"
+
+void Demo::Register() {
+ SetFactory(
+ [](content::BrowserContext* context) -> gen::DemoViewModel* {
+ return new Demo(Profile::FromBrowserContext(context));
+ });
+}
+
+Demo::Demo(Profile* profile) : profile_(profile) {
+}
+
+Demo::~Demo() {
+}
+
+void Demo::Initialize() {
+ GetContextEditor().SetString(kContextKeyUsername,
+ profile_->GetProfileUserName());
+}
« no previous file with comments | « chrome/browser/ui/webui/demo_ui/demo.h ('k') | chrome/browser/ui/webui/demo_ui/demo_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698