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

Side by Side Diff: chrome/browser/resources/media_router/media_router.js

Issue 2176613003: [Media Router] Clean up issues related code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 <include src="media_router_data.js"> 5 <include src="media_router_data.js">
6 <include src="media_router_ui_interface.js"> 6 <include src="media_router_ui_interface.js">
7 7
8 // Handles user events for the Media Router UI. 8 // Handles user events for the Media Router UI.
9 cr.define('media_router', function() { 9 cr.define('media_router', function() {
10 'use strict'; 10 'use strict';
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 * Acts on an issue and dismisses it from the UI. 174 * Acts on an issue and dismisses it from the UI.
175 * Called when the user performs an action on an issue. 175 * Called when the user performs an action on an issue.
176 * 176 *
177 * @param {!Event} event 177 * @param {!Event} event
178 * Parameters in |event|.detail: 178 * Parameters in |event|.detail:
179 * id - issue ID. 179 * id - issue ID.
180 * actionType - type of action performed by the user. 180 * actionType - type of action performed by the user.
181 * helpPageId - the numeric help center ID. 181 * helpPageId - the numeric help center ID.
182 */ 182 */
183 function onIssueActionClick(event) { 183 function onIssueActionClick(event) {
184 /** @type {{id: string, actionType: number, helpPageId: number}} */ 184 /** @type {{id: number, actionType: number, helpPageId: number}} */
185 var detail = event.detail; 185 var detail = event.detail;
186 media_router.browserApi.actOnIssue(detail.id, 186 media_router.browserApi.actOnIssue(detail.id,
187 detail.actionType, 187 detail.actionType,
188 detail.helpPageId); 188 detail.helpPageId);
189 container.issue = null; 189 container.issue = null;
190 } 190 }
191 191
192 /** 192 /**
193 * Creates a media route. 193 * Creates a media route.
194 * Called when the user requests to create a media route. 194 * Called when the user requests to create a media route.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 function onWindowBlur() { 362 function onWindowBlur() {
363 media_router.browserApi.reportBlur(); 363 media_router.browserApi.reportBlur();
364 } 364 }
365 365
366 return { 366 return {
367 initialize: initialize, 367 initialize: initialize,
368 }; 368 };
369 }); 369 });
370 370
371 window.addEventListener('load', media_router.initialize); 371 window.addEventListener('load', media_router.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698