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

Unified Diff: chrome/browser/resources/set_as_metro_default.js

Issue 10539169: Prototype version of the first-run dialog for Windows 8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed *_win.* files and fixed-up css/http. Created 8 years, 6 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: chrome/browser/resources/set_as_metro_default.js
diff --git a/chrome/browser/resources/set_as_metro_default.js b/chrome/browser/resources/set_as_metro_default.js
new file mode 100644
index 0000000000000000000000000000000000000000..a62af34accd1aa4c0e89f5fff6ae32e90471b0b2
--- /dev/null
+++ b/chrome/browser/resources/set_as_metro_default.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 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() {
+ // Since all we want here is forwarding of certain commands, all can be done
+ // in the anonymous function's scope.
+
+ function wireUpWindow() {
+ $('launch-button').addEventListener('click', function() {
+ chrome.send('SetAsMetroDefault:LaunchSetDefaultBrowserFlow');
+ });
+
+ $('return-button').addEventListener('click', function() {
+ chrome.send('SetAsMetroDefault:ReturnToBrowser');
+ });
+ }
+
+ window.addEventListener('DOMContentLoaded', wireUpWindow);
+})();

Powered by Google App Engine
This is Rietveld 408576698