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

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

Issue 15458003: Plugs in the new thumbnailing algorithm to ThumbnailTabHelper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added unit tests. Created 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/thumbnailing_context.h" 5 #include "chrome/browser/thumbnails/thumbnailing_context.h"
6 6
7 #include "content/public/browser/render_view_host.h" 7 #include "content/public/browser/render_view_host.h"
8 #include "content/public/browser/render_widget_host_view.h"
mazda 2013/05/23 19:13:57 Is this change needed?
motek. 2013/05/27 16:54:54 No, a leftover of something I tried out. Un-done.
8 9
9 namespace thumbnails { 10 namespace thumbnails {
10 11
11 ThumbnailingContext::ThumbnailingContext(content::WebContents* web_contents, 12 ThumbnailingContext::ThumbnailingContext(content::WebContents* web_contents,
12 ThumbnailService* receiving_service, 13 ThumbnailService* receiving_service,
13 bool load_interrupted) 14 bool load_interrupted)
14 : service(receiving_service), 15 : service(receiving_service),
15 url(web_contents->GetURL()), 16 url(web_contents->GetURL()),
16 clip_result(CLIP_RESULT_UNPROCESSED) { 17 clip_result(CLIP_RESULT_UNPROCESSED) {
17 score.at_top = 18 score.at_top =
18 (web_contents->GetRenderViewHost()->GetLastScrollOffset().y() == 0); 19 (web_contents->GetRenderViewHost()->GetLastScrollOffset().y() == 0);
19 score.load_completed = !web_contents->IsLoading() && !load_interrupted; 20 score.load_completed = !web_contents->IsLoading() && !load_interrupted;
20 } 21 }
21 22
22 ThumbnailingContext::~ThumbnailingContext() { 23 ThumbnailingContext::~ThumbnailingContext() {
23 } 24 }
24 25
25 } 26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698