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

Side by Side Diff: chrome/browser/tab_contents/thumbnail_generator.cc

Issue 6320005: Fix a regression that was introduced in http://codereview.chromium.org/6010004/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/tab_contents/thumbnail_generator.h" 5 #include "chrome/browser/tab_contents/thumbnail_generator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 173 }
174 174
175 void ThumbnailGenerator::MonitorRenderer(RenderWidgetHost* renderer, 175 void ThumbnailGenerator::MonitorRenderer(RenderWidgetHost* renderer,
176 bool monitor) { 176 bool monitor) {
177 Source<RenderWidgetHost> renderer_source = Source<RenderWidgetHost>(renderer); 177 Source<RenderWidgetHost> renderer_source = Source<RenderWidgetHost>(renderer);
178 bool currently_monitored = 178 bool currently_monitored =
179 registrar_.IsRegistered( 179 registrar_.IsRegistered(
180 this, 180 this,
181 NotificationType::RENDER_WIDGET_HOST_WILL_DESTROY_BACKING_STORE, 181 NotificationType::RENDER_WIDGET_HOST_WILL_DESTROY_BACKING_STORE,
182 renderer_source); 182 renderer_source);
183 if (monitor |= currently_monitored) { 183 if (monitor != currently_monitored) {
184 if (monitor) { 184 if (monitor) {
185 registrar_.Add( 185 registrar_.Add(
186 this, 186 this,
187 NotificationType::RENDER_WIDGET_HOST_WILL_DESTROY_BACKING_STORE, 187 NotificationType::RENDER_WIDGET_HOST_WILL_DESTROY_BACKING_STORE,
188 renderer_source); 188 renderer_source);
189 registrar_.Add( 189 registrar_.Add(
190 this, 190 this,
191 NotificationType::RENDER_WIDGET_HOST_DID_UPDATE_BACKING_STORE, 191 NotificationType::RENDER_WIDGET_HOST_DID_UPDATE_BACKING_STORE,
192 renderer_source); 192 renderer_source);
193 registrar_.Add( 193 registrar_.Add(
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 &ThumbnailGenerator::ShownDelayHandler); 527 &ThumbnailGenerator::ShownDelayHandler);
528 } 528 }
529 } 529 }
530 530
531 void ThumbnailGenerator::EraseHostFromShownList(RenderWidgetHost* widget) { 531 void ThumbnailGenerator::EraseHostFromShownList(RenderWidgetHost* widget) {
532 std::vector<RenderWidgetHost*>::iterator found = 532 std::vector<RenderWidgetHost*>::iterator found =
533 std::find(shown_hosts_.begin(), shown_hosts_.end(), widget); 533 std::find(shown_hosts_.begin(), shown_hosts_.end(), widget);
534 if (found != shown_hosts_.end()) 534 if (found != shown_hosts_.end())
535 shown_hosts_.erase(found); 535 shown_hosts_.erase(found);
536 } 536 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698