Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: chrome/browser/ui/views/task_manager_view.cc

Issue 10560015: Implement base::win::IsMetroProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698