| OLD | NEW |
| 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_resource_providers.h" | 5 #include "chrome/browser/task_manager/task_manager_resource_providers.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 // TaskManagerTabContentsResource class | 214 // TaskManagerTabContentsResource class |
| 215 //////////////////////////////////////////////////////////////////////////////// | 215 //////////////////////////////////////////////////////////////////////////////// |
| 216 | 216 |
| 217 // static | 217 // static |
| 218 SkBitmap* TaskManagerTabContentsResource::prerender_icon_ = NULL; | 218 SkBitmap* TaskManagerTabContentsResource::prerender_icon_ = NULL; |
| 219 | 219 |
| 220 TaskManagerTabContentsResource::TaskManagerTabContentsResource( | 220 TaskManagerTabContentsResource::TaskManagerTabContentsResource( |
| 221 TabContentsWrapper* tab_contents) | 221 TabContentsWrapper* tab_contents) |
| 222 : TaskManagerRendererResource( | 222 : TaskManagerRendererResource( |
| 223 tab_contents->tab_contents()->GetRenderProcessHost()->GetHandle(), | 223 tab_contents->tab_contents()->GetRenderProcessHost()->GetHandle(), |
| 224 tab_contents->render_view_host()), | 224 tab_contents->tab_contents()->render_view_host()), |
| 225 tab_contents_(tab_contents), | 225 tab_contents_(tab_contents), |
| 226 is_instant_preview_(false) { | 226 is_instant_preview_(false) { |
| 227 if (!prerender_icon_) { | 227 if (!prerender_icon_) { |
| 228 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 228 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 229 prerender_icon_ = rb.GetBitmapNamed(IDR_PRERENDER); | 229 prerender_icon_ = rb.GetBitmapNamed(IDR_PRERENDER); |
| 230 } | 230 } |
| 231 for (BrowserList::const_iterator i = BrowserList::begin(); | 231 for (BrowserList::const_iterator i = BrowserList::begin(); |
| 232 i != BrowserList::end(); ++i) { | 232 i != BrowserList::end(); ++i) { |
| 233 if ((*i)->instant() && | 233 if ((*i)->instant() && |
| 234 (*i)->instant()->GetPreviewContents() == tab_contents_) { | 234 (*i)->instant()->GetPreviewContents() == tab_contents_) { |
| (...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1441 | 1441 |
| 1442 return &resource_; | 1442 return &resource_; |
| 1443 } | 1443 } |
| 1444 | 1444 |
| 1445 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { | 1445 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { |
| 1446 task_manager_->AddResource(&resource_); | 1446 task_manager_->AddResource(&resource_); |
| 1447 } | 1447 } |
| 1448 | 1448 |
| 1449 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { | 1449 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { |
| 1450 } | 1450 } |
| OLD | NEW |