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

Unified Diff: components/wug/resources/context.js

Issue 928163002: Initial implementation of WebUI generator (WUG) toolkit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Owners updated. 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
Index: components/wug/resources/context.js
diff --git a/components/wug/resources/context.js b/components/wug/resources/context.js
new file mode 100644
index 0000000000000000000000000000000000000000..0bd28f1d5f0fa8d17c2524d2c0a9fe1a3d7c2f4c
--- /dev/null
+++ b/components/wug/resources/context.js
@@ -0,0 +1,21 @@
+// Copyright (c) 2014 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.
+
+(function(global) {
+ var has_cr = !!global.cr;
+ var cr_define_bckp = null;
+ if (has_cr && global.cr.define)
+ cr_define_bckp = global.cr.define;
+ if (!has_cr)
+ global.cr = {}
+ global.cr.define = function(_, define) {
+ global.wug = global.wug || {}
+ global.wug.Context = define().ScreenContext;
+ }
+<include src="../../../chrome/browser/resources/chromeos/login/screen_context.js">
+ if (!has_cr)
+ delete global.cr;
+ if (cr_define_bckp)
+ global.cr.define = cr_define_bckp;
+})(this);

Powered by Google App Engine
This is Rietveld 408576698