Update mojo surfaces bindings and mojo/cc/ glue
[chromium-blink-merge.git] / chrome / browser / thumbnails / thumbnailing_context.cc
blob2457ebbdaef91ad49177ab5225ef2c517c1a8314
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
3 // found in the LICENSE file.
5 #include "chrome/browser/thumbnails/thumbnailing_context.h"
7 #include "content/public/browser/render_view_host.h"
9 namespace thumbnails {
11 ThumbnailingContext::ThumbnailingContext(content::WebContents* web_contents,
12 ThumbnailService* receiving_service,
13 bool load_interrupted)
14 : service(receiving_service),
15 url(web_contents->GetURL()),
16 clip_result(CLIP_RESULT_UNPROCESSED) {
17 score.at_top =
18 (web_contents->GetRenderViewHost()->GetLastScrollOffset().y() == 0);
19 score.load_completed = !web_contents->IsLoading() && !load_interrupted;
22 ThumbnailingContext::ThumbnailingContext()
23 : clip_result(CLIP_RESULT_UNPROCESSED) {
26 ThumbnailingContext::~ThumbnailingContext() {