| 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/task_manager/task_manager.h" | 5 #include "chrome/browser/task_manager/task_manager.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/metrics/stats_table.h" | 8 #include "base/metrics/stats_table.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/prefs/scoped_user_pref_update.h" | 10 #include "base/prefs/scoped_user_pref_update.h" |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 } | 491 } |
| 492 #endif | 492 #endif |
| 493 instance_->GetWidget()->Show(); | 493 instance_->GetWidget()->Show(); |
| 494 | 494 |
| 495 // Set the initial focus to the list of tasks. | 495 // Set the initial focus to the list of tasks. |
| 496 views::FocusManager* focus_manager = instance_->GetFocusManager(); | 496 views::FocusManager* focus_manager = instance_->GetFocusManager(); |
| 497 if (focus_manager) | 497 if (focus_manager) |
| 498 focus_manager->SetFocusedView(instance_->tab_table_); | 498 focus_manager->SetFocusedView(instance_->tab_table_); |
| 499 | 499 |
| 500 #if defined(USE_ASH) | 500 #if defined(USE_ASH) |
| 501 gfx::NativeWindow native_window = instance_->GetWidget()->GetNativeWindow(); |
| 501 ash::SetShelfItemDetailsForDialogWindow( | 502 ash::SetShelfItemDetailsForDialogWindow( |
| 502 instance_->GetWidget()->GetNativeWindow(), | 503 native_window, IDR_ASH_SHELF_ICON_TASK_MANAGER, native_window->title()); |
| 503 IDR_ASH_SHELF_ICON_TASK_MANAGER); | |
| 504 #endif | 504 #endif |
| 505 } | 505 } |
| 506 | 506 |
| 507 // ButtonListener implementation. | 507 // ButtonListener implementation. |
| 508 void TaskManagerView::ButtonPressed( | 508 void TaskManagerView::ButtonPressed( |
| 509 views::Button* sender, | 509 views::Button* sender, |
| 510 const ui::Event& event) { | 510 const ui::Event& event) { |
| 511 typedef ui::ListSelectionModel::SelectedIndices SelectedIndices; | 511 typedef ui::ListSelectionModel::SelectedIndices SelectedIndices; |
| 512 DCHECK_EQ(kill_button_, sender); | 512 DCHECK_EQ(kill_button_, sender); |
| 513 SelectedIndices selection(tab_table_->selection_model().selected_indices()); | 513 SelectedIndices selection(tab_table_->selection_model().selected_indices()); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 } // namespace | 647 } // namespace |
| 648 | 648 |
| 649 namespace chrome { | 649 namespace chrome { |
| 650 | 650 |
| 651 // Declared in browser_dialogs.h so others don't need to depend on our header. | 651 // Declared in browser_dialogs.h so others don't need to depend on our header. |
| 652 void ShowTaskManager(Browser* browser) { | 652 void ShowTaskManager(Browser* browser) { |
| 653 TaskManagerView::Show(browser); | 653 TaskManagerView::Show(browser); |
| 654 } | 654 } |
| 655 | 655 |
| 656 } // namespace chrome | 656 } // namespace chrome |
| OLD | NEW |