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

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

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 554
555 gfx::Size TaskManagerView::GetPreferredSize() { 555 gfx::Size TaskManagerView::GetPreferredSize() {
556 return gfx::Size(kDefaultWidth, kDefaultHeight); 556 return gfx::Size(kDefaultWidth, kDefaultHeight);
557 } 557 }
558 558
559 // static 559 // static
560 void TaskManagerView::Show(bool highlight_background_resources) { 560 void TaskManagerView::Show(bool highlight_background_resources) {
561 if (instance_) { 561 if (instance_) {
562 if (instance_->highlight_background_resources_ != 562 if (instance_->highlight_background_resources_ !=
563 highlight_background_resources) { 563 highlight_background_resources) {
564 instance_->window()->CloseWindow(); 564 instance_->window()->Close();
565 } else { 565 } else {
566 // If there's a Task manager window open already, just activate it. 566 // If there's a Task manager window open already, just activate it.
567 instance_->window()->Activate(); 567 instance_->window()->Activate();
568 return; 568 return;
569 } 569 }
570 } 570 }
571 instance_ = new TaskManagerView(highlight_background_resources); 571 instance_ = new TaskManagerView(highlight_background_resources);
572 views::Window::CreateChromeWindow(NULL, gfx::Rect(), instance_); 572 views::Window::CreateChromeWindow(NULL, gfx::Rect(), instance_);
573 instance_->InitAlwaysOnTopState(); 573 instance_->InitAlwaysOnTopState();
574 instance_->model_->StartUpdating(); 574 instance_->model_->StartUpdating();
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 // Declared in browser_dialogs.h so others don't need to depend on our header. 776 // Declared in browser_dialogs.h so others don't need to depend on our header.
777 void ShowTaskManager() { 777 void ShowTaskManager() {
778 TaskManagerView::Show(false); 778 TaskManagerView::Show(false);
779 } 779 }
780 780
781 void ShowBackgroundPages() { 781 void ShowBackgroundPages() {
782 TaskManagerView::Show(true); 782 TaskManagerView::Show(true);
783 } 783 }
784 784
785 } // namespace browser 785 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | chrome/browser/ui/views/theme_install_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698