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

Side by Side Diff: chrome/browser/resources/task_manager/main.js

Issue 8510045: TaskManager: Fix for showing column selection menu on right click on the task manager list. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 /** @constructor */ 5 /** @constructor */
6 function TaskManager() { } 6 function TaskManager() { }
7 7
8 cr.addSingletonGetter(TaskManager); 8 cr.addSingletonGetter(TaskManager);
9 9
10 /* 10 /*
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 item.setAttributeNode(this.document_.createAttribute("checked")); 258 item.setAttributeNode(this.document_.createAttribute("checked"));
259 this.columnSelectContextMenu_.appendChild(item); 259 this.columnSelectContextMenu_.appendChild(item);
260 } 260 }
261 261
262 this.document_.body.appendChild(this.columnSelectContextMenu_); 262 this.document_.body.appendChild(this.columnSelectContextMenu_);
263 cr.ui.Menu.decorate(this.columnSelectContextMenu_); 263 cr.ui.Menu.decorate(this.columnSelectContextMenu_);
264 264
265 cr.ui.contextMenuHandler.addContextMenuProperty(this.table_.header); 265 cr.ui.contextMenuHandler.addContextMenuProperty(this.table_.header);
266 this.table_.header.contextMenu = this.columnSelectContextMenu_; 266 this.table_.header.contextMenu = this.columnSelectContextMenu_;
267 267
268 cr.ui.contextMenuHandler.addContextMenuProperty(this.table_.list);
269 this.table_.list.contextMenu = this.columnSelectContextMenu_;
270
268 this.document_.addEventListener('command', this.onCommand_.bind(this)); 271 this.document_.addEventListener('command', this.onCommand_.bind(this));
269 this.document_.addEventListener('canExecute', 272 this.document_.addEventListener('canExecute',
270 this.onCommandCanExecute_.bind(this)); 273 this.onCommandCanExecute_.bind(this));
271 274
272 }, 275 },
273 276
274 initTableMenu_: function () { 277 initTableMenu_: function () {
275 this.table_menu_commands_ = []; 278 this.table_menu_commands_ = [];
276 this.tableContextMenu_ = this.document_.createElement('menu'); 279 this.tableContextMenu_ = this.document_.createElement('menu');
277 280
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 taskmanager.onTaskChange(start, length, tasks); 559 taskmanager.onTaskChange(start, length, tasks);
557 } 560 }
558 561
559 function taskRemoved(start, length) { 562 function taskRemoved(start, length) {
560 // Sometimes this can get called too early. 563 // Sometimes this can get called too early.
561 if (!taskmanager) 564 if (!taskmanager)
562 return; 565 return;
563 taskmanager.onTaskRemove(start, length); 566 taskmanager.onTaskRemove(start, length);
564 } 567 }
565 568
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698