OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 tab_contents_(tab_contents), | 278 tab_contents_(tab_contents), |
279 is_instant_preview_(false) { | 279 is_instant_preview_(false) { |
280 if (!prerender_icon_) { | 280 if (!prerender_icon_) { |
281 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 281 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
282 prerender_icon_ = rb.GetImageSkiaNamed(IDR_PRERENDER); | 282 prerender_icon_ = rb.GetImageSkiaNamed(IDR_PRERENDER); |
283 } | 283 } |
284 for (BrowserList::const_iterator i = BrowserList::begin(); | 284 for (BrowserList::const_iterator i = BrowserList::begin(); |
285 i != BrowserList::end(); ++i) { | 285 i != BrowserList::end(); ++i) { |
286 if ((*i)->instant_controller() && | 286 if ((*i)->instant_controller() && |
287 (*i)->instant_controller()->instant()->GetPreviewContents() == | 287 (*i)->instant_controller()->instant()->GetPreviewContents() == |
288 tab_contents_) { | 288 tab_contents_->web_contents()) { |
289 is_instant_preview_ = true; | 289 is_instant_preview_ = true; |
290 break; | 290 break; |
291 } | 291 } |
292 } | 292 } |
293 } | 293 } |
294 | 294 |
295 TaskManagerTabContentsResource::~TaskManagerTabContentsResource() { | 295 TaskManagerTabContentsResource::~TaskManagerTabContentsResource() { |
296 } | 296 } |
297 | 297 |
298 void TaskManagerTabContentsResource::InstantCommitted() { | 298 void TaskManagerTabContentsResource::InstantCommitted() { |
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1871 case content::NOTIFICATION_WEB_CONTENTS_CONNECTED: | 1871 case content::NOTIFICATION_WEB_CONTENTS_CONNECTED: |
1872 Add(web_contents->GetRenderViewHost()); | 1872 Add(web_contents->GetRenderViewHost()); |
1873 break; | 1873 break; |
1874 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED: | 1874 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED: |
1875 Remove(web_contents->GetRenderViewHost()); | 1875 Remove(web_contents->GetRenderViewHost()); |
1876 break; | 1876 break; |
1877 default: | 1877 default: |
1878 NOTREACHED() << "Unexpected notification."; | 1878 NOTREACHED() << "Unexpected notification."; |
1879 } | 1879 } |
1880 } | 1880 } |
OLD | NEW |