| OLD | NEW |
| 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 #import "chrome/browser/ui/cocoa/tabpose_window.h" | 5 #import "chrome/browser/ui/cocoa/tabpose_window.h" |
| 6 | 6 |
| 7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // keep it simple and request full thumbnails for everything. | 179 // keep it simple and request full thumbnails for everything. |
| 180 // TODO(thakis): Request smaller thumbnails for users with many tabs. | 180 // TODO(thakis): Request smaller thumbnails for users with many tabs. |
| 181 gfx::Size page_size(size_); // Logical size the renderer renders at. | 181 gfx::Size page_size(size_); // Logical size the renderer renders at. |
| 182 gfx::Size pixel_size(size_); // Physical pixel size the image is rendered at. | 182 gfx::Size pixel_size(size_); // Physical pixel size the image is rendered at. |
| 183 | 183 |
| 184 generator->MonitorRenderer(rwh_, true); | 184 generator->MonitorRenderer(rwh_, true); |
| 185 | 185 |
| 186 // Will send an IPC to the renderer on the IO thread. | 186 // Will send an IPC to the renderer on the IO thread. |
| 187 generator->AskForSnapshot( | 187 generator->AskForSnapshot( |
| 188 rwh_, | 188 rwh_, |
| 189 /*prefer_backing_store=*/false, | |
| 190 base::Bind(&ThumbnailLoader::DidReceiveBitmap, | 189 base::Bind(&ThumbnailLoader::DidReceiveBitmap, |
| 191 weak_factory_.GetWeakPtr()), | 190 weak_factory_.GetWeakPtr()), |
| 192 page_size, | 191 page_size, |
| 193 pixel_size); | 192 pixel_size); |
| 194 } | 193 } |
| 195 | 194 |
| 196 } // namespace tabpose | 195 } // namespace tabpose |
| 197 | 196 |
| 198 @implementation ThumbnailLayer | 197 @implementation ThumbnailLayer |
| 199 | 198 |
| (...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 tile.set_tab_contents(contents); | 1665 tile.set_tab_contents(contents); |
| 1667 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index]; | 1666 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index]; |
| 1668 [thumbLayer setTabContents:contents]; | 1667 [thumbLayer setTabContents:contents]; |
| 1669 } | 1668 } |
| 1670 | 1669 |
| 1671 - (void)tabStripModelDeleted { | 1670 - (void)tabStripModelDeleted { |
| 1672 [self close]; | 1671 [self close]; |
| 1673 } | 1672 } |
| 1674 | 1673 |
| 1675 @end | 1674 @end |
| OLD | NEW |