| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/cocoa/task_manager_mac.h" | 5 #include "chrome/browser/ui/cocoa/task_manager_mac.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 } | 506 } |
| 507 | 507 |
| 508 NSImage* TaskManagerMac::GetImageForRow(int row) { | 508 NSImage* TaskManagerMac::GetImageForRow(int row) { |
| 509 return icon_cache_.GetImageForRow(row); | 509 return icon_cache_.GetImageForRow(row); |
| 510 } | 510 } |
| 511 | 511 |
| 512 //////////////////////////////////////////////////////////////////////////////// | 512 //////////////////////////////////////////////////////////////////////////////// |
| 513 // TaskManagerMac, public: | 513 // TaskManagerMac, public: |
| 514 | 514 |
| 515 void TaskManagerMac::WindowWasClosed() { | 515 void TaskManagerMac::WindowWasClosed() { |
| 516 instance_ = NULL; |
| 516 delete this; | 517 delete this; |
| 517 instance_ = NULL; | |
| 518 } | 518 } |
| 519 | 519 |
| 520 int TaskManagerMac::RowCount() const { | 520 int TaskManagerMac::RowCount() const { |
| 521 return model_->ResourceCount(); | 521 return model_->ResourceCount(); |
| 522 } | 522 } |
| 523 | 523 |
| 524 gfx::ImageSkia TaskManagerMac::GetIcon(int r) const { | 524 gfx::ImageSkia TaskManagerMac::GetIcon(int r) const { |
| 525 return model_->GetResourceIcon(r); | 525 return model_->GetResourceIcon(r); |
| 526 } | 526 } |
| 527 | 527 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 539 | 539 |
| 540 namespace chrome { | 540 namespace chrome { |
| 541 | 541 |
| 542 // Declared in browser_dialogs.h. | 542 // Declared in browser_dialogs.h. |
| 543 void ShowTaskManager(Browser* browser) { | 543 void ShowTaskManager(Browser* browser) { |
| 544 TaskManagerMac::Show(); | 544 TaskManagerMac::Show(); |
| 545 } | 545 } |
| 546 | 546 |
| 547 } // namespace chrome | 547 } // namespace chrome |
| 548 | 548 |
| OLD | NEW |