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

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

Issue 10437006: Converts ui/views/controls, ui/views/examples, ui/base/models to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 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) 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 model_->AddObserver(this); 60 model_->AddObserver(this);
61 } 61 }
62 62
63 ~TaskManagerTableModel() { 63 ~TaskManagerTableModel() {
64 model_->RemoveObserver(this); 64 model_->RemoveObserver(this);
65 } 65 }
66 66
67 // GroupTableModel. 67 // GroupTableModel.
68 int RowCount() OVERRIDE; 68 int RowCount() OVERRIDE;
69 string16 GetText(int row, int column) OVERRIDE; 69 string16 GetText(int row, int column) OVERRIDE;
70 SkBitmap GetIcon(int row) OVERRIDE; 70 gfx::ImageSkia GetIcon(int row) OVERRIDE;
71 void GetGroupRangeForItem(int item, views::GroupRange* range) OVERRIDE; 71 void GetGroupRangeForItem(int item, views::GroupRange* range) OVERRIDE;
72 void SetObserver(ui::TableModelObserver* observer) OVERRIDE; 72 void SetObserver(ui::TableModelObserver* observer) OVERRIDE;
73 virtual int CompareValues(int row1, int row2, int column_id) OVERRIDE; 73 virtual int CompareValues(int row1, int row2, int column_id) OVERRIDE;
74 74
75 // TaskManagerModelObserver. 75 // TaskManagerModelObserver.
76 virtual void OnModelChanged(); 76 virtual void OnModelChanged();
77 virtual void OnItemsChanged(int start, int length); 77 virtual void OnItemsChanged(int start, int length);
78 virtual void OnItemsAdded(int start, int length); 78 virtual void OnItemsAdded(int start, int length);
79 virtual void OnItemsRemoved(int start, int length); 79 virtual void OnItemsRemoved(int start, int length);
80 80
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 if (!model_->IsResourceFirstInGroup(row)) 156 if (!model_->IsResourceFirstInGroup(row))
157 return string16(); 157 return string16();
158 return model_->GetResourceV8MemoryAllocatedSize(row); 158 return model_->GetResourceV8MemoryAllocatedSize(row);
159 159
160 default: 160 default:
161 NOTREACHED(); 161 NOTREACHED();
162 return string16(); 162 return string16();
163 } 163 }
164 } 164 }
165 165
166 SkBitmap TaskManagerTableModel::GetIcon(int row) { 166 gfx::ImageSkia TaskManagerTableModel::GetIcon(int row) {
167 return model_->GetResourceIcon(row); 167 return model_->GetResourceIcon(row);
168 } 168 }
169 169
170 170
171 void TaskManagerTableModel::GetGroupRangeForItem(int item, 171 void TaskManagerTableModel::GetGroupRangeForItem(int item,
172 views::GroupRange* range) { 172 views::GroupRange* range) {
173 TaskManagerModel::GroupRange range_pair = 173 TaskManagerModel::GroupRange range_pair =
174 model_->GetGroupRangeForResource(item); 174 model_->GetGroupRangeForResource(item);
175 range->start = range_pair.first; 175 range->start = range_pair.first;
176 range->length = range_pair.second; 176 range->length = range_pair.second;
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 // Declared in browser_dialogs.h so others don't need to depend on our header. 793 // Declared in browser_dialogs.h so others don't need to depend on our header.
794 void ShowTaskManager() { 794 void ShowTaskManager() {
795 TaskManagerView::Show(false); 795 TaskManagerView::Show(false);
796 } 796 }
797 797
798 void ShowBackgroundPages() { 798 void ShowBackgroundPages() {
799 TaskManagerView::Show(true); 799 TaskManagerView::Show(true);
800 } 800 }
801 801
802 } // namespace browser 802 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698