| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/metrics/stats_table.h" | 9 #include "base/metrics/stats_table.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 | 574 |
| 575 gfx::Size TaskManagerView::GetPreferredSize() { | 575 gfx::Size TaskManagerView::GetPreferredSize() { |
| 576 return gfx::Size(kDefaultWidth, kDefaultHeight); | 576 return gfx::Size(kDefaultWidth, kDefaultHeight); |
| 577 } | 577 } |
| 578 | 578 |
| 579 // static | 579 // static |
| 580 void TaskManagerView::Show(bool highlight_background_resources) { | 580 void TaskManagerView::Show(bool highlight_background_resources) { |
| 581 #ifdef OS_WIN | 581 #ifdef OS_WIN |
| 582 // Under Metro we can't fling up this native window, so we | 582 // Under Metro we can't fling up this native window, so we |
| 583 // silently ignore the request for now. | 583 // silently ignore the request for now. |
| 584 if (base::win::GetMetroModule()) | 584 if (base::win::InMetroMode()) |
| 585 return; | 585 return; |
| 586 #endif | 586 #endif |
| 587 | 587 |
| 588 if (instance_) { | 588 if (instance_) { |
| 589 if (instance_->highlight_background_resources_ != | 589 if (instance_->highlight_background_resources_ != |
| 590 highlight_background_resources) { | 590 highlight_background_resources) { |
| 591 instance_->GetWidget()->Close(); | 591 instance_->GetWidget()->Close(); |
| 592 } else { | 592 } else { |
| 593 // If there's a Task manager window open already, just activate it. | 593 // If there's a Task manager window open already, just activate it. |
| 594 instance_->GetWidget()->Activate(); | 594 instance_->GetWidget()->Activate(); |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 // Declared in browser_dialogs.h so others don't need to depend on our header. | 804 // Declared in browser_dialogs.h so others don't need to depend on our header. |
| 805 void ShowTaskManager() { | 805 void ShowTaskManager() { |
| 806 TaskManagerView::Show(false); | 806 TaskManagerView::Show(false); |
| 807 } | 807 } |
| 808 | 808 |
| 809 void ShowBackgroundPages() { | 809 void ShowBackgroundPages() { |
| 810 TaskManagerView::Show(true); | 810 TaskManagerView::Show(true); |
| 811 } | 811 } |
| 812 | 812 |
| 813 } // namespace browser | 813 } // namespace browser |
| OLD | NEW |