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

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

Issue 199105: Continue with the FreeBSD port - this version builds and links, though... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 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/tab_contents.h ('k') | chrome/browser/zygote_main_linux.cc » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 8
9 #include "base/histogram.h" 9 #include "base/histogram.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 backing_store->size().height(), true)) 122 backing_store->size().height(), true))
123 return result; 123 return result;
124 GetBitmapForBackingStore(backing_store, &temp_canvas); 124 GetBitmapForBackingStore(backing_store, &temp_canvas);
125 125
126 // Get the bitmap out of the canvas and resample it. It would be nice if this 126 // Get the bitmap out of the canvas and resample it. It would be nice if this
127 // whole Windows-specific block could be put into a function, but the memory 127 // whole Windows-specific block could be put into a function, but the memory
128 // management wouldn't work out because the bitmap is a PlatformDevice which 128 // management wouldn't work out because the bitmap is a PlatformDevice which
129 // can't actually be copied. 129 // can't actually be copied.
130 const SkBitmap& bmp = temp_canvas.getTopPlatformDevice().accessBitmap(false); 130 const SkBitmap& bmp = temp_canvas.getTopPlatformDevice().accessBitmap(false);
131 131
132 #elif defined(OS_LINUX) 132 #elif defined(USE_X11)
133 SkBitmap bmp = backing_store->PaintRectToBitmap( 133 SkBitmap bmp = backing_store->PaintRectToBitmap(
134 gfx::Rect(0, 0, 134 gfx::Rect(0, 0,
135 backing_store->size().width(), backing_store->size().height())); 135 backing_store->size().width(), backing_store->size().height()));
136 136
137 #elif defined(OS_MACOSX) 137 #elif defined(OS_MACOSX)
138 SkBitmap bmp; 138 SkBitmap bmp;
139 NOTIMPLEMENTED(); 139 NOTIMPLEMENTED();
140 #endif 140 #endif
141 141
142 result = skia::ImageOperations::DownsampleByTwoUntilSize( 142 result = skia::ImageOperations::DownsampleByTwoUntilSize(
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 &ThumbnailGenerator::ShownDelayHandler); 356 &ThumbnailGenerator::ShownDelayHandler);
357 } 357 }
358 } 358 }
359 359
360 void ThumbnailGenerator::EraseHostFromShownList(RenderWidgetHost* widget) { 360 void ThumbnailGenerator::EraseHostFromShownList(RenderWidgetHost* widget) {
361 std::vector<RenderWidgetHost*>::iterator found = 361 std::vector<RenderWidgetHost*>::iterator found =
362 std::find(shown_hosts_.begin(), shown_hosts_.end(), widget); 362 std::find(shown_hosts_.begin(), shown_hosts_.end(), widget);
363 if (found != shown_hosts_.end()) 363 if (found != shown_hosts_.end())
364 shown_hosts_.erase(found); 364 shown_hosts_.erase(found);
365 } 365 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/browser/zygote_main_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698