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

Side by Side Diff: chrome/browser/task_manager/task_manager_resource_providers.cc

Issue 11421079: Persist the Instant API to committed search result pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes Created 8 years 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 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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698