| Index: chrome/browser/thumbnails/thumbnailing_context.cc
|
| diff --git a/chrome/browser/thumbnails/thumbnailing_context.cc b/chrome/browser/thumbnails/thumbnailing_context.cc
|
| index e9ffe6399ca7c448dd594e88b44dcb4581450b17..04765e640550aaadb791ecf188739fa49b4c98ad 100644
|
| --- a/chrome/browser/thumbnails/thumbnailing_context.cc
|
| +++ b/chrome/browser/thumbnails/thumbnailing_context.cc
|
| @@ -12,57 +12,19 @@
|
| ThumbnailingContext::ThumbnailingContext(content::WebContents* web_contents,
|
| ThumbnailService* receiving_service,
|
| bool load_interrupted)
|
| - : content::WebContentsObserver(web_contents),
|
| - service_(receiving_service),
|
| - clip_result_(CLIP_RESULT_UNPROCESSED) {
|
| - score_.at_top =
|
| + : service(receiving_service),
|
| + url(web_contents->GetURL()),
|
| + clip_result(CLIP_RESULT_UNPROCESSED) {
|
| + score.at_top =
|
| (web_contents->GetRenderWidgetHostView()->GetLastScrollOffset().y() == 0);
|
| - score_.load_completed = !web_contents->IsLoading() && !load_interrupted;
|
| + score.load_completed = !web_contents->IsLoading() && !load_interrupted;
|
| }
|
|
|
| ThumbnailingContext::ThumbnailingContext()
|
| - : content::WebContentsObserver(nullptr),
|
| - clip_result_(CLIP_RESULT_UNPROCESSED) {
|
| + : clip_result(CLIP_RESULT_UNPROCESSED) {
|
| }
|
|
|
| ThumbnailingContext::~ThumbnailingContext() {
|
| }
|
|
|
| -const scoped_refptr<ThumbnailService>& ThumbnailingContext::service() const {
|
| - return service_;
|
| -}
|
| -
|
| -const GURL& ThumbnailingContext::GetURL() const {
|
| - return web_contents()->GetURL();
|
| -}
|
| -
|
| -ClipResult ThumbnailingContext::clip_result() const {
|
| - return clip_result_;
|
| -}
|
| -
|
| -void ThumbnailingContext::set_clip_result(ClipResult result) {
|
| - clip_result_ = result;
|
| -}
|
| -
|
| -gfx::Size ThumbnailingContext::requested_copy_size() {
|
| - return requested_copy_size_;
|
| -}
|
| -
|
| -void ThumbnailingContext::set_requested_copy_size(
|
| - const gfx::Size& requested_size) {
|
| - requested_copy_size_ = requested_size;
|
| -}
|
| -
|
| -ThumbnailScore ThumbnailingContext::score() const {
|
| - return score_;
|
| -}
|
| -
|
| -void ThumbnailingContext::SetBoringScore(double score) {
|
| - score_.boring_score = score;
|
| -}
|
| -
|
| -void ThumbnailingContext::SetGoodClipping(bool is_good_clipping) {
|
| - score_.good_clipping = is_good_clipping;
|
| -}
|
| -
|
| } // namespace thumbnails
|
|
|