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

Unified Diff: ios/chrome/browser/web/resources/print.js

Issue 2553563004: [ios] Adds JS resources for various features. (Closed)
Patch Set: Upload. Created 4 years 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 | « ios/chrome/browser/web/resources/PRESUBMIT.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/web/resources/print.js
diff --git a/ios/chrome/browser/web/resources/print.js b/ios/chrome/browser/web/resources/print.js
new file mode 100644
index 0000000000000000000000000000000000000000..94c4ccb79145246f7ba91fe1d6b71a55df14bae2
--- /dev/null
+++ b/ios/chrome/browser/web/resources/print.js
@@ -0,0 +1,23 @@
+// Copyright 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.
+
+// This file adheres to closure-compiler conventions in order to enable
+// compilation with ADVANCED_OPTIMIZATIONS. In particular, members that are to
+// be accessed externally should be specified in this['style'] as opposed to
+// this.style because member identifiers are minified by default.
+// See http://goo.gl/FwOgy
+
+// Intercept window.print calls.
+
+/**
+ * Namespace for this module.
+ */
+__gCrWeb['print'] = {};
+
+new function() {
+ // Overwrites window.print function to invoke chrome command.
+ window.print = function() {
+ __gCrWeb.message.invokeOnHost({'command': 'print.window.print'});
+ };
+}
« no previous file with comments | « ios/chrome/browser/web/resources/PRESUBMIT.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698