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

Side by Side Diff: chrome/browser/thumbnails/thumbnail_tab_helper.cc

Issue 374633002: SkBitmap::Config is deprecated, use SkColorType instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments from #4 Created 6 years, 5 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/thumbnails/thumbnail_tab_helper.h" 5 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/thumbnails/thumbnail_service.h" 9 #include "chrome/browser/thumbnails/thumbnail_service.h"
10 #include "chrome/browser/thumbnails/thumbnail_service_factory.h" 10 #include "chrome/browser/thumbnails/thumbnail_service_factory.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 ui::GetScaleFactorForNativeView(view->GetNativeView())); 101 ui::GetScaleFactorForNativeView(view->GetNativeView()));
102 context->clip_result = algorithm->GetCanvasCopyInfo( 102 context->clip_result = algorithm->GetCanvasCopyInfo(
103 copy_rect.size(), 103 copy_rect.size(),
104 scale_factor, 104 scale_factor,
105 &copy_rect, 105 &copy_rect,
106 &context->requested_copy_size); 106 &context->requested_copy_size);
107 render_widget_host->CopyFromBackingStore( 107 render_widget_host->CopyFromBackingStore(
108 copy_rect, 108 copy_rect,
109 context->requested_copy_size, 109 context->requested_copy_size,
110 base::Bind(&ProcessCapturedBitmap, context, algorithm), 110 base::Bind(&ProcessCapturedBitmap, context, algorithm),
111 SkBitmap::kARGB_8888_Config); 111 kN32_SkColorType);
112 } 112 }
113 113
114 } // namespace 114 } // namespace
115 115
116 ThumbnailTabHelper::ThumbnailTabHelper(content::WebContents* contents) 116 ThumbnailTabHelper::ThumbnailTabHelper(content::WebContents* contents)
117 : content::WebContentsObserver(contents), 117 : content::WebContentsObserver(contents),
118 enabled_(true), 118 enabled_(true),
119 load_interrupted_(false) { 119 load_interrupted_(false) {
120 // Even though we deal in RenderWidgetHosts, we only care about its 120 // Even though we deal in RenderWidgetHosts, we only care about its
121 // subclass, RenderViewHost when it is in a tab. We don't make thumbnails 121 // subclass, RenderViewHost when it is in a tab. We don't make thumbnails
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED, 219 content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED,
220 content::Source<RenderWidgetHost>(renderer)); 220 content::Source<RenderWidgetHost>(renderer));
221 } 221 }
222 } 222 }
223 223
224 void ThumbnailTabHelper::WidgetHidden(RenderWidgetHost* widget) { 224 void ThumbnailTabHelper::WidgetHidden(RenderWidgetHost* widget) {
225 if (!enabled_) 225 if (!enabled_)
226 return; 226 return;
227 UpdateThumbnailIfNecessary(web_contents()); 227 UpdateThumbnailIfNecessary(web_contents());
228 } 228 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698