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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 col.sortable = true; | 402 col.sortable = true; |
403 columns_.push_back(col); | 403 columns_.push_back(col); |
404 tab_table_->AddColumn(col); | 404 tab_table_->AddColumn(col); |
405 } | 405 } |
406 } | 406 } |
407 } | 407 } |
408 } | 408 } |
409 | 409 |
410 void TaskManagerView::ViewHierarchyChanged( | 410 void TaskManagerView::ViewHierarchyChanged( |
411 const ViewHierarchyChangedDetails& details) { | 411 const ViewHierarchyChangedDetails& details) { |
| 412 views::DialogDelegateView::ViewHierarchyChanged(details); |
412 // Since we want the Kill button and the Memory Details link to show up in | 413 // Since we want the Kill button and the Memory Details link to show up in |
413 // the same visual row as the close button, which is provided by the | 414 // the same visual row as the close button, which is provided by the |
414 // framework, we must add the buttons to the non-client view, which is the | 415 // framework, we must add the buttons to the non-client view, which is the |
415 // parent of this view. Similarly, when we're removed from the view | 416 // parent of this view. Similarly, when we're removed from the view |
416 // hierarchy, we must take care to clean up those items as well. | 417 // hierarchy, we must take care to clean up those items as well. |
417 if (details.child == this) { | 418 if (details.child == this) { |
418 if (details.is_add) { | 419 if (details.is_add) { |
419 details.parent->AddChildView(about_memory_link_); | 420 details.parent->AddChildView(about_memory_link_); |
420 details.parent->AddChildView(kill_button_); | 421 details.parent->AddChildView(kill_button_); |
421 tab_table_parent_ = tab_table_->CreateParentIfNecessary(); | 422 tab_table_parent_ = tab_table_->CreateParentIfNecessary(); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 // Declared in browser_dialogs.h so others don't need to depend on our header. | 665 // Declared in browser_dialogs.h so others don't need to depend on our header. |
665 void ShowTaskManager(Browser* browser) { | 666 void ShowTaskManager(Browser* browser) { |
666 TaskManagerView::Show(browser); | 667 TaskManagerView::Show(browser); |
667 } | 668 } |
668 | 669 |
669 void HideTaskManager() { | 670 void HideTaskManager() { |
670 TaskManagerView::Hide(); | 671 TaskManagerView::Hide(); |
671 } | 672 } |
672 | 673 |
673 } // namespace chrome | 674 } // namespace chrome |
OLD | NEW |