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

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

Issue 9030010: Move most of the remaining users of WebContentsObserver::tab_contents() to use web_contents(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 12 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // desired width and the desired height. For instance, if the input 108 // desired width and the desired height. For instance, if the input
109 // bitmap is vertically long (ex. 400x900) and the desired size is 109 // bitmap is vertically long (ex. 400x900) and the desired size is
110 // square (ex. 100x100), the clipped bitmap will be the top half of the 110 // square (ex. 100x100), the clipped bitmap will be the top half of the
111 // input bitmap (400x400). 111 // input bitmap (400x400).
112 static SkBitmap GetClippedBitmap(const SkBitmap& bitmap, 112 static SkBitmap GetClippedBitmap(const SkBitmap& bitmap,
113 int desired_width, 113 int desired_width,
114 int desired_height, 114 int desired_height,
115 ClipResult* clip_result); 115 ClipResult* clip_result);
116 116
117 // Update the thumbnail of the given tab contents if necessary. 117 // Update the thumbnail of the given tab contents if necessary.
118 void UpdateThumbnailIfNecessary(TabContents* tab_contents); 118 void UpdateThumbnailIfNecessary(content::WebContents* webb_contents);
119 119
120 // Returns true if we should update the thumbnail of the given URL. 120 // Returns true if we should update the thumbnail of the given URL.
121 static bool ShouldUpdateThumbnail(Profile* profile, 121 static bool ShouldUpdateThumbnail(Profile* profile,
122 history::TopSites* top_sites, 122 history::TopSites* top_sites,
123 const GURL& url); 123 const GURL& url);
124 124
125 // content::WebContentsObserver overrides. 125 // content::WebContentsObserver overrides.
126 virtual void DidStartLoading() OVERRIDE; 126 virtual void DidStartLoading() OVERRIDE;
127 virtual void StopNavigation() OVERRIDE; 127 virtual void StopNavigation() OVERRIDE;
128 128
(...skipping 22 matching lines...) Expand all
151 typedef std::map<int, 151 typedef std::map<int,
152 linked_ptr<AsyncRequestInfo> > ThumbnailCallbackMap; 152 linked_ptr<AsyncRequestInfo> > ThumbnailCallbackMap;
153 ThumbnailCallbackMap callback_map_; 153 ThumbnailCallbackMap callback_map_;
154 154
155 bool load_interrupted_; 155 bool load_interrupted_;
156 156
157 DISALLOW_COPY_AND_ASSIGN(ThumbnailGenerator); 157 DISALLOW_COPY_AND_ASSIGN(ThumbnailGenerator);
158 }; 158 };
159 159
160 #endif // CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_ 160 #endif // CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc ('k') | chrome/browser/tab_contents/thumbnail_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698