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

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

Issue 10349013: Prevent browser thumbnailer from trying to read from frontbuffer (surface texture) when none exists. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Providing implementations for the other platforms Created 8 years, 7 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 #ifndef CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 void UpdateThumbnailIfNecessary(content::WebContents* webb_contents); 137 void UpdateThumbnailIfNecessary(content::WebContents* webb_contents);
138 138
139 // Update the thumbnail of the given tab. 139 // Update the thumbnail of the given tab.
140 void UpdateThumbnail(content::WebContents* web_contents, 140 void UpdateThumbnail(content::WebContents* web_contents,
141 const SkBitmap& bitmap, 141 const SkBitmap& bitmap,
142 const ThumbnailGenerator::ClipResult& clip_result); 142 const ThumbnailGenerator::ClipResult& clip_result);
143 143
144 // Returns true if we should update the thumbnail of the given URL. 144 // Returns true if we should update the thumbnail of the given URL.
145 static bool ShouldUpdateThumbnail(Profile* profile, 145 static bool ShouldUpdateThumbnail(Profile* profile,
146 history::TopSites* top_sites, 146 history::TopSites* top_sites,
147 const GURL& url); 147 const GURL& url,
148 bool has_surface);
148 149
149 // content::WebContentsObserver overrides. 150 // content::WebContentsObserver overrides.
150 virtual void DidStartLoading() OVERRIDE; 151 virtual void DidStartLoading() OVERRIDE;
151 virtual void StopNavigation() OVERRIDE; 152 virtual void StopNavigation() OVERRIDE;
152 153
153 private: 154 private:
154 virtual void WidgetDidReceivePaintAtSizeAck( 155 virtual void WidgetDidReceivePaintAtSizeAck(
155 content::RenderWidgetHost* widget, 156 content::RenderWidgetHost* widget,
156 int tag, 157 int tag,
157 const gfx::Size& size); 158 const gfx::Size& size);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 bool load_interrupted_; 192 bool load_interrupted_;
192 193
193 base::WeakPtrFactory<ThumbnailGenerator> weak_factory_; 194 base::WeakPtrFactory<ThumbnailGenerator> weak_factory_;
194 scoped_ptr<base::WeakPtrFactory<content::WebContents> > 195 scoped_ptr<base::WeakPtrFactory<content::WebContents> >
195 web_contents_weak_factory_; 196 web_contents_weak_factory_;
196 197
197 DISALLOW_COPY_AND_ASSIGN(ThumbnailGenerator); 198 DISALLOW_COPY_AND_ASSIGN(ThumbnailGenerator);
198 }; 199 };
199 200
200 #endif // CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_ 201 #endif // CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698