Index: src/wp-includes/js/media-views.js
===================================================================
--- src/wp-includes/js/media-views.js	(revision 29219)
+++ src/wp-includes/js/media-views.js	(working copy)
@@ -94,6 +94,8 @@
 		/**
 		 * Activate a mode.
 		 *
+		 * @since 3.5.0
+		 *
 		 * @param {string} mode
 		 *
 		 * @fires this.view#{this.id}:activate:{this._mode}
@@ -135,6 +137,8 @@
 		/**
 		 * Render a mode.
 		 *
+		 * @since 3.5.0
+		 *
 		 * @param {string} mode
 		 *
 		 * @fires this.view#{this.id}:create:{this._mode}
@@ -182,6 +186,8 @@
 		/**
 		 * Get the region's view.
 		 *
+		 * @since 3.5.0
+		 *
 		 * @returns {wp.media.View}
 		 */
 		get: function() {
@@ -191,6 +197,8 @@
 		/**
 		 * Set the region's view as a subview of the frame.
 		 *
+		 * @since 3.5.0
+		 *
 		 * @param {Array|Object} views
 		 * @param {Object} [options={}]
 		 * @returns {wp.Backbone.Subviews} Subviews is returned to allow chaining
@@ -205,6 +213,8 @@
 		/**
 		 * Trigger regional view events on the frame.
 		 *
+		 * @since 3.5.0
+		 *
 		 * @param {string} event
 		 * @returns {undefined|wp.media.controller.Region} Returns itself to allow chaining.
 		 */
@@ -232,6 +242,8 @@
 	/**
 	 * wp.media.controller.StateMachine
 	 *
+	 * @since 3.5.0
+	 *
 	 * @constructor
 	 * @augments Backbone.Model
 	 * @mixin
@@ -257,6 +269,8 @@
 		 * Ensure that the `states` collection exists so the `StateMachine`
 		 *   can be used as a mixin.
 		 *
+		 * @since 3.5.0
+		 *
 		 * @param {string} id
 		 * @returns {wp.media.controller.State} Returns a State model
 		 *   from the StateMachine collection
@@ -280,6 +294,8 @@
 		 * created the `states` collection, or are trying to select a state
 		 * that does not exist.
 		 *
+		 * @since 3.5.0
+		 *
 		 * @param {string} id
 		 *
 		 * @fires wp.media.controller.State#deactivate
@@ -311,6 +327,8 @@
 		 * Call the `state()` method with no parameters to retrieve the current
 		 * active state.
 		 *
+		 * @since 3.5.0
+		 *
 		 * @returns {wp.media.controller.State} Returns a State model
 		 *    from the StateMachine collection
 		 */
@@ -347,6 +365,11 @@
 	 * @augments Backbone.Model
 	 */
 	media.controller.State = Backbone.Model.extend({
+		/**
+		 * Constructor.
+		 *
+		 * @since 3.5.0
+		 */
 		constructor: function() {
 			this.on( 'activate', this._preActivate, this );
 			this.on( 'activate', this.activate, this );
@@ -364,34 +387,47 @@
 		},
 		/**
 		 * @abstract
+		 * @since 3.5.0
 		 */
 		ready: function() {},
+
 		/**
 		 * @abstract
+		 * @since 3.5.0
 		 */
 		activate: function() {},
+
 		/**
 		 * @abstract
+		 * @since 3.5.0
 		 */
 		deactivate: function() {},
+
 		/**
 		 * @abstract
+		 * @since 3.5.0
 		 */
 		reset: function() {},
+
 		/**
 		 * @access private
+		 * @since 4.0.0
 		 */
 		_ready: function() {
 			this._updateMenu();
 		},
+
 		/**
 		 * @access private
+		 * @since 3.5.0
 		*/
 		_preActivate: function() {
 			this.active = true;
 		},
+
 		/**
 		 * @access private
+		 * @since 3.5.0
 		 */
 		_postActivate: function() {
 			this.on( 'change:menu', this._menu, this );
@@ -407,8 +443,10 @@
 			this._content();
 			this._router();
 		},
+
 		/**
 		 * @access private
+		 * @since 3.5.0
 		 */
 		_deactivate: function() {
 			this.active = false;
@@ -420,20 +458,26 @@
 			this.off( 'change:content', this._content, this );
 			this.off( 'change:toolbar', this._toolbar, this );
 		},
+
 		/**
 		 * @access private
+		 * @since 3.5.0
 		 */
 		_title: function() {
 			this.frame.title.render( this.get('titleMode') || 'default' );
 		},
+
 		/**
 		 * @access private
+		 * @since 3.5.0
 		 */
 		_renderTitle: function( view ) {
 			view.$el.text( this.get('title') || '' );
 		},
+
 		/**
 		 * @access private
+		 * @since 3.5.0
 		 */
 		_router: function() {
 			var router = this.frame.router,
@@ -452,8 +496,10 @@
 				view.select( this.frame.content.mode() );
 			}
 		},
+
 		/**
 		 * @access private
+		 * @since 3.5.0
 		 */
 		_menu: function() {
 			var menu = this.frame.menu,
@@ -471,8 +517,10 @@
 				view.select( this.id );
 			}
 		},
+
 		/**
 		 * @access private
+		 * @since 3.5.0
 		 */
 		_updateMenu: function() {
 			var previous = this.previous('menu'),
@@ -486,8 +534,10 @@
 				this.frame.on( 'menu:render:' + menu, this._renderMenu, this );
 			}
 		},
+
 		/**
 		 * @access private
+		 * @since 3.5.0
 		 */
 		_renderMenu: function( view ) {
 			var menuItem = this.get('menuItem'),
@@ -523,6 +573,9 @@
 	});
 
 	media.selectionSync = {
+		/**
+		 * @since 3.5.0
+		 */
 		syncSelection: function() {
 			var selection = this.get('selection'),
 				manager = this.frame._selection;
@@ -550,6 +603,8 @@
 		 * of the selection's attachments and the set of selected
 		 * attachments that this specific selection considered invalid.
 		 * Reset the difference and record the single attachment.
+		 *
+		 * @since 3.5.0
 		 */
 		recordSelection: function() {
 			var selection = this.get('selection'),
@@ -603,6 +658,8 @@
 		/**
 		 * If a library isn't provided, query all media items.
 		 * If a selection instance isn't provided, create one.
+		 *
+		 * @since 3.5.0
 		 */
 		initialize: function() {
 			var selection = this.get('selection'),
@@ -641,6 +698,9 @@
 			this.resetDisplays();
 		},
 
+		/**
+		 * @since 3.5.0
+		 */
 		activate: function() {
 			this.syncSelection();
 
@@ -654,6 +714,9 @@
 			}
 		},
 
+		/**
+		 * @since 3.5.0
+		 */
 		deactivate: function() {
 			this.recordSelection();
 
@@ -666,12 +729,18 @@
 			wp.Uploader.queue.off( null, null, this );
 		},
 
+		/**
+		 * @since 3.5.0
+		 */
 		reset: function() {
 			this.get('selection').reset();
 			this.resetDisplays();
 			this.refreshContent();
 		},
 
+		/**
+		 * @since 3.5.0
+		 */
 		resetDisplays: function() {
 			var defaultProps = media.view.settings.defaultProps;
 			this._displays = [];
@@ -683,6 +752,8 @@
 		},
 
 		/**
+		 * @since 3.5.0
+		 *
 		 * @param {wp.media.model.Attachment} attachment
 		 * @returns {Backbone.Model}
 		 */
@@ -696,6 +767,8 @@
 		},
 
 		/**
+		 * @since 3.6.0
+		 *
 		 * @param {wp.media.model.Attachment} attachment
 		 * @returns {Object}
 		 */
@@ -708,6 +781,8 @@
 		},
 
 		/**
+		 * @since 3.6.0
+		 *
 		 * @param {wp.media.model.Attachment} attachment
 		 * @returns {Boolean}
 		 */
@@ -728,6 +803,8 @@
 		 * If the state is active, no items are selected, and the current
 		 * content mode is not an option in the state's router (provided
 		 * the state has a router), reset the content mode to the default.
+		 *
+		 * @since 3.5.0
 		 */
 		refreshContent: function() {
 			var selection = this.get('selection'),
@@ -749,6 +826,8 @@
 		 * limit themselves to one attachment (in this case, the last
 		 * attachment in the upload queue).
 		 *
+		 * @since 3.5.0
+		 *
 		 * @param {wp.media.model.Attachment} attachment
 		 */
 		uploading: function( attachment ) {
@@ -762,6 +841,8 @@
 
 		/**
 		 * Only track the browse router on library states.
+		 *
+		 * @since 3.5.0
 		 */
 		saveContentMode: function() {
 			if ( 'browse' !== this.get('router') ) {
@@ -800,11 +881,19 @@
 			priority: 60
 		}, media.controller.Library.prototype.defaults ),
 
+		/**
+		 * @since 3.9.0
+		 *
+		 * @param options Attributes
+		 */
 		initialize: function( options ) {
 			this.image = options.image;
 			media.controller.State.prototype.initialize.apply( this, arguments );
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		activate: function() {
 			this.frame.modal.$el.addClass('image-details');
 		}
@@ -843,6 +932,9 @@
 			syncSelection: false
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		initialize: function() {
 			// If we haven't been provided a `library`, create a `Selection`.
 			if ( ! this.get('library') )
@@ -854,6 +946,9 @@
 			media.controller.Library.prototype.initialize.apply( this, arguments );
 		},
 
+		/**
+		 * since 3.9.0
+		 */
 		activate: function() {
 			var library = this.get('library');
 
@@ -868,6 +963,9 @@
 			media.controller.Library.prototype.activate.apply( this, arguments );
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		deactivate: function() {
 			// Stop watching for uploaded attachments.
 			this.get('library').unobserve( wp.Uploader.queue );
@@ -877,6 +975,11 @@
 			media.controller.Library.prototype.deactivate.apply( this, arguments );
 		},
 
+		/**
+		 * @since 3.9.0
+		 *
+		 * @param browser
+		 */
 		gallerySettings: function( browser ) {
 			if ( ! this.get('displaySettings') ) {
 				return;
@@ -935,6 +1038,9 @@
 			syncSelection: false
 		}, media.controller.Library.prototype.defaults ),
 
+		/**
+		 * @since 3.9.0
+		 */
 		initialize: function() {
 			// If we haven't been provided a `library`, create a `Selection`.
 			if ( ! this.get('library') )
@@ -943,6 +1049,9 @@
 			media.controller.Library.prototype.initialize.apply( this, arguments );
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		activate: function() {
 			var library = this.get('library'),
 				edit    = this.frame.state('gallery-edit').get('library');
@@ -997,6 +1106,9 @@
 			syncSelection: false
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		initialize: function() {
 			var collectionType = this.get('collectionType');
 
@@ -1018,6 +1130,9 @@
 			media.controller.Library.prototype.initialize.apply( this, arguments );
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		activate: function() {
 			var library = this.get('library');
 
@@ -1032,6 +1147,9 @@
 			media.controller.Library.prototype.activate.apply( this, arguments );
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		deactivate: function() {
 			// Stop watching for uploaded attachments.
 			this.get('library').unobserve( wp.Uploader.queue );
@@ -1041,6 +1159,11 @@
 			media.controller.Library.prototype.deactivate.apply( this, arguments );
 		},
 
+		/**
+		 * @since 3.9.0
+		 *
+		 * @param browser
+		 */
 		renderSettings: function( browser ) {
 			var library = this.get('library'),
 				collectionType = this.get('collectionType'),
@@ -1099,6 +1222,9 @@
 			syncSelection: false
 		}, media.controller.Library.prototype.defaults ),
 
+		/**
+		 * @since 3.9.0
+		 */
 		initialize: function() {
 			var collectionType = this.get('collectionType');
 
@@ -1117,6 +1243,9 @@
 			media.controller.Library.prototype.initialize.apply( this, arguments );
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		activate: function() {
 			var library = this.get('library'),
 				editLibrary = this.get('editLibrary'),
@@ -1166,6 +1295,9 @@
 			syncSelection: true
 		}, media.controller.Library.prototype.defaults ),
 
+		/**
+		 * @since 3.5.0
+		 */
 		initialize: function() {
 			var library, comparator;
 
@@ -1199,6 +1331,9 @@
 			library.observe( this.get('selection') );
 		},
 
+		/**
+		 * @since 3.5.0
+		 */
 		activate: function() {
 			this.updateSelection();
 			this.frame.on( 'open', this.updateSelection, this );
@@ -1206,12 +1341,18 @@
 			media.controller.Library.prototype.activate.apply( this, arguments );
 		},
 
+		/**
+		 * @since 3.5.0
+		 */
 		deactivate: function() {
 			this.frame.off( 'open', this.updateSelection, this );
 
 			media.controller.Library.prototype.deactivate.apply( this, arguments );
 		},
 
+		/**
+		 * @since 3.5.0
+		 */
 		updateSelection: function() {
 			var selection = this.get('selection'),
 				id = media.view.settings.post.featuredImageId,
@@ -1249,6 +1390,11 @@
 			syncSelection: true
 		}, media.controller.Library.prototype.defaults ),
 
+		/**
+		 * @since 3.9.0
+		 *
+		 * @param options
+		 */
 		initialize: function( options ) {
 			var library, comparator;
 
@@ -1283,11 +1429,17 @@
 			library.observe( this.get('selection') );
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		activate: function() {
 			this.updateSelection();
 			media.controller.Library.prototype.activate.apply( this, arguments );
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		updateSelection: function() {
 			var selection = this.get('selection'),
 				attachment = this.image.attachment;
@@ -1315,14 +1467,23 @@
 			url:     ''
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		activate: function() {
 			this.listenTo( this.frame, 'toolbar:render:edit-image', this.toolbar );
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		deactivate: function() {
 			this.stopListening( this.frame );
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		toolbar: function() {
 			var frame = this.frame,
 				lastState = frame.lastState(),
@@ -1366,6 +1527,11 @@
 			syncSelection:   false
 		}, media.controller.Library.prototype.defaults ),
 
+		/**
+		 * @since 3.9.0
+		 *
+		 * @param options
+		 */
 		initialize: function( options ) {
 			this.media = options.media;
 			this.type = options.type;
@@ -1374,6 +1540,9 @@
 			media.controller.Library.prototype.initialize.apply( this, arguments );
 		},
 
+		/**
+		 * @since 3.9.0
+		 */
 		activate: function() {
 			if ( media.frame.lastMime ) {
 				this.set( 'library', media.query({ type: media.frame.lastMime }) );
