summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 20:52:46 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 20:52:46 +0000
commit63b9eb2c8d3bb29e814f7a0da90568e77a47a42f (patch)
tree00950d43f5a88ee7337d2b789bf9ee56bea8b5e1 /base
parente29b96a75e3d7209226f77c47310a7773c31a116 (diff)
downloadchromium_src-63b9eb2c8d3bb29e814f7a0da90568e77a47a42f.zip
chromium_src-63b9eb2c8d3bb29e814f7a0da90568e77a47a42f.tar.gz
chromium_src-63b9eb2c8d3bb29e814f7a0da90568e77a47a42f.tar.bz2
Mac tabpose: Add thumbnails
Most things actually work. Missing from this CL: * Reloading thumbnails for tabs that change. This is required to show non-white thumbnails for thumbnails that are still waiting on the net when tabpose is opened. * Showing infobars / bookmark bar in the thumbnail * Showing accelerated surfaces (youtube videos on 10.6, compositor on 10.6) BUG=50307 TEST=Enable tabpose. Should see thumbnails for all tabs (some loaded after a delay). Thumbnails should animate in correctly even if a tab has info bars, a detached NTP, or docked devtools. Tabs that haven't been frontmost since the window was last resized should look good. Opening many tabs and then immediately jumping into expose shouldn't crash. Review URL: http://codereview.chromium.org/3163003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57901 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/scoped_vector.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/base/scoped_vector.h b/base/scoped_vector.h
index 34620e6..ec152c9 100644
--- a/base/scoped_vector.h
+++ b/base/scoped_vector.h
@@ -56,6 +56,30 @@ class ScopedVector {
void reset() { STLDeleteElements(&v); }
void resize(size_t new_size) { v.resize(new_size); }
+ // Lets the ScopedVector take ownership of |x|.
+ iterator insert(iterator position, T* x) {
+ return v.insert(position, x);
+ }
+
+ iterator erase(iterator position) {
+ delete *position;
+ return v.erase(position);
+ }
+
+ iterator erase(iterator first, iterator last) {
+ STLDeleteContainerPointers(first, last);
+ return v.erase(first, last);
+ }
+
+ // Like |erase()|, but doesn't delete the element at |position|.
+ iterator weak_erase(iterator position) {
+ return v.erase(position);
+ }
+
+ // Like |erase()|, but doesn't delete the elements in [first, last).
+ iterator weak_erase(iterator first, iterator last) {
+ return v.erase(first, last);
+ }
private:
std::vector<T*> v;