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

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

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 years, 9 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
« no previous file with comments | « chrome/browser/tab_contents/thumbnail_generator.h ('k') | chrome/browser/tab_render_watcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/tab_contents/thumbnail_generator.h" 5 #include "chrome/browser/tab_contents/thumbnail_generator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // 44 //
45 // When a renderer is about to be hidden (this usually occurs when the 45 // When a renderer is about to be hidden (this usually occurs when the
46 // current tab is closed or another tab is clicked), update the 46 // current tab is closed or another tab is clicked), update the
47 // thumbnail for the tab rendered by the renderer, if needed. The 47 // thumbnail for the tab rendered by the renderer, if needed. The
48 // heuristics to judge whether or not to update the thumbnail is 48 // heuristics to judge whether or not to update the thumbnail is
49 // implemented in ShouldUpdateThumbnail(). 49 // implemented in ShouldUpdateThumbnail().
50 // 50 //
51 // We'll likely revise the algorithm to improve quality of thumbnails this 51 // We'll likely revise the algorithm to improve quality of thumbnails this
52 // service generates. 52 // service generates.
53 53
54 using content::RenderViewHost;
55 using content::RenderWidgetHost;
54 using content::WebContents; 56 using content::WebContents;
55 57
56 namespace { 58 namespace {
57 59
58 static const int kThumbnailWidth = 212; 60 static const int kThumbnailWidth = 212;
59 static const int kThumbnailHeight = 132; 61 static const int kThumbnailHeight = 132;
60 62
61 static const char kThumbnailHistogramName[] = "Thumbnail.ComputeMS"; 63 static const char kThumbnailHistogramName[] = "Thumbnail.ComputeMS";
62 64
63 // Creates a downsampled thumbnail for the given RenderWidgetHost's backing 65 // Creates a downsampled thumbnail for the given RenderWidgetHost's backing
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 513
512 void ThumbnailGenerator::DidStartLoading() { 514 void ThumbnailGenerator::DidStartLoading() {
513 load_interrupted_ = false; 515 load_interrupted_ = false;
514 } 516 }
515 517
516 void ThumbnailGenerator::StopNavigation() { 518 void ThumbnailGenerator::StopNavigation() {
517 // This function gets called when the page loading is interrupted by the 519 // This function gets called when the page loading is interrupted by the
518 // stop button. 520 // stop button.
519 load_interrupted_ = true; 521 load_interrupted_ = true;
520 } 522 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/thumbnail_generator.h ('k') | chrome/browser/tab_render_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698