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

Side by Side Diff: content/browser/resources/media/new/util.js

Issue 20804002: Added the next series of files that go into media-internals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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 (c) 2013 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 /**
6 * @fileoverview Some utility functions that don't belong anywhere else in the
7 * code.
8 */
9
10 var util = {};
scherkus (not reviewing) 2013/07/29 23:55:18 OOC is there a reason why this file doesn't use th
Ty Overby 2013/07/30 00:13:34 Because it doesn't need to? The only reason that
scherkus (not reviewing) 2013/07/30 03:12:08 Doesn't need to ... today ;) (I'm fine leaving as
11 util.object = {};
12 /**
13 * Calls a function for each element in an object/map/hash.
14 *
15 * @param {Object.<K,V>} obj The object over which to iterate.
16 * @param {function(this:T,V,?,Object<K,V>):?} f The function to call
17 * for every element. This function takes 3 arguments (the element, the
18 * index and the object) and the return value is ignored.
19 * @param {T=} opt_obj This is use as the 'this' object within f.
20 */
scherkus (not reviewing) 2013/07/29 23:55:18 this comment is copied verbatim from Apache-licens
Ty Overby 2013/07/30 00:13:34 The *code* was copied verbatim from the closure-cl
21 util.object.forEach = function(obj, f, optObj) {
22 'use strict';
23 var key;
24 for (key in obj) {
25 if (obj.hasOwnProperty(key)) {
26 f.call(optObj, obj[key], key, obj);
27 }
28 }
29 };
OLDNEW
« content/browser/resources/media/new/main.js ('K') | « content/browser/resources/media/new/main.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698