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 20 matching lines...) Expand all Loading... | |
31 #include "ui/views/controls/link_listener.h" | 31 #include "ui/views/controls/link_listener.h" |
32 #include "ui/views/controls/menu/menu.h" | 32 #include "ui/views/controls/menu/menu.h" |
33 #include "ui/views/controls/table/group_table_model.h" | 33 #include "ui/views/controls/table/group_table_model.h" |
34 #include "ui/views/controls/table/group_table_view.h" | 34 #include "ui/views/controls/table/group_table_view.h" |
35 #include "ui/views/controls/table/table_view_observer.h" | 35 #include "ui/views/controls/table/table_view_observer.h" |
36 #include "ui/views/layout/layout_constants.h" | 36 #include "ui/views/layout/layout_constants.h" |
37 #include "ui/views/widget/widget.h" | 37 #include "ui/views/widget/widget.h" |
38 #include "ui/views/window/dialog_delegate.h" | 38 #include "ui/views/window/dialog_delegate.h" |
39 | 39 |
40 #if defined(OS_WIN) | 40 #if defined(OS_WIN) |
41 #include "base/win/metro.h" | 41 #include "win8/util/win8_util.h" |
42 #endif | 42 #endif |
43 | 43 |
44 // The task manager window default size. | 44 // The task manager window default size. |
45 static const int kDefaultWidth = 460; | 45 static const int kDefaultWidth = 460; |
46 static const int kDefaultHeight = 270; | 46 static const int kDefaultHeight = 270; |
47 | 47 |
48 // Yellow highlight used when highlighting background resources. | 48 // Yellow highlight used when highlighting background resources. |
49 static const SkColor kBackgroundResourceHighlight = | 49 static const SkColor kBackgroundResourceHighlight = |
50 SkColorSetRGB(0xff, 0xf1, 0xcd); | 50 SkColorSetRGB(0xff, 0xf1, 0xcd); |
51 | 51 |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
579 link_prefered_height); | 579 link_prefered_height); |
580 } | 580 } |
581 | 581 |
582 gfx::Size TaskManagerView::GetPreferredSize() { | 582 gfx::Size TaskManagerView::GetPreferredSize() { |
583 return gfx::Size(kDefaultWidth, kDefaultHeight); | 583 return gfx::Size(kDefaultWidth, kDefaultHeight); |
584 } | 584 } |
585 | 585 |
586 // static | 586 // static |
587 void TaskManagerView::Show(bool highlight_background_resources) { | 587 void TaskManagerView::Show(bool highlight_background_resources) { |
588 // In Windows Metro it's not good to open this native window. | 588 // In Windows Metro it's not good to open this native window. |
589 DCHECK(!base::win::IsMetroProcess()); | 589 DCHECK(!win8::IsSingleWindowMetroMode()); |
590 | 590 |
cpu_(ooo_6.6-7.5)
2012/12/03 20:56:26
FYI, There is a discussion about what task manager
gab
2012/12/04 00:19:06
So making this change only enables (and some other
gab
2012/12/04 18:47:42
Looks like task_manager_view.cc is already compile
| |
591 if (instance_) { | 591 if (instance_) { |
592 if (instance_->highlight_background_resources_ != | 592 if (instance_->highlight_background_resources_ != |
593 highlight_background_resources) { | 593 highlight_background_resources) { |
594 instance_->GetWidget()->Close(); | 594 instance_->GetWidget()->Close(); |
595 } else { | 595 } else { |
596 // If there's a Task manager window open already, just activate it. | 596 // If there's a Task manager window open already, just activate it. |
597 instance_->GetWidget()->Activate(); | 597 instance_->GetWidget()->Activate(); |
598 return; | 598 return; |
599 } | 599 } |
600 } | 600 } |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
807 // Declared in browser_dialogs.h so others don't need to depend on our header. | 807 // Declared in browser_dialogs.h so others don't need to depend on our header. |
808 void ShowTaskManager() { | 808 void ShowTaskManager() { |
809 TaskManagerView::Show(false); | 809 TaskManagerView::Show(false); |
810 } | 810 } |
811 | 811 |
812 void ShowBackgroundPages() { | 812 void ShowBackgroundPages() { |
813 TaskManagerView::Show(true); | 813 TaskManagerView::Show(true); |
814 } | 814 } |
815 | 815 |
816 } // namespace chrome | 816 } // namespace chrome |
OLD | NEW |