diff options
author | saintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-17 18:04:47 +0000 |
---|---|---|
committer | saintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-17 18:04:47 +0000 |
commit | 80d4aeaebaf149c5ba113f9133fd0e067d7e321d (patch) | |
tree | 9525850ce740fca5584385674043482a93374ce8 /content | |
parent | 2b5f8edb264918e897ee7d1e0847d0ffbfeb6b70 (diff) | |
download | chromium_src-80d4aeaebaf149c5ba113f9133fd0e067d7e321d.zip chromium_src-80d4aeaebaf149c5ba113f9133fd0e067d7e321d.tar.gz chromium_src-80d4aeaebaf149c5ba113f9133fd0e067d7e321d.tar.bz2 |
Improve large tab strip by leveraging touch icons when present.
BUG=none
TEST=TemplateURLParserTest.TestDictionary, TestMSDN, TestWikipedia (as per sadrul)
Note: testing with mobile user-agent will also yield better results: --user-agent=iPhone or similar mobile
Review URL: http://codereview.chromium.org/7065052
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/cancelable_request.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/content/browser/cancelable_request.h b/content/browser/cancelable_request.h index df27cbc..18819ed 100644 --- a/content/browser/cancelable_request.h +++ b/content/browser/cancelable_request.h @@ -244,6 +244,9 @@ class CancelableRequestConsumerTSimple : public CancelableRequestConsumerBase { // Cancels all requests outstanding. void CancelAllRequests(); + // Cancels all requests outstanding matching the client data. + void CancelAllRequestsForClientData(T client_data); + // Returns the handle for the first request that has the specified client data // (in |handle|). Returns true if there is a request for the specified client // data, false otherwise. @@ -349,8 +352,9 @@ void CancelableRequestConsumerTSimple<T>::CancelAllRequests() { // without acquiring the provider lock (http://crbug.com/85970). PendingRequestList copied_requests(pending_requests_); for (typename PendingRequestList::iterator i = copied_requests.begin(); - i != copied_requests.end(); ++i) + i != copied_requests.end(); ++i) { i->first.provider->CancelRequest(i->first.handle); + } copied_requests.clear(); // That should have cleared all the pending items. @@ -358,6 +362,18 @@ void CancelableRequestConsumerTSimple<T>::CancelAllRequests() { } template<class T> +void CancelableRequestConsumerTSimple<T>::CancelAllRequestsForClientData( + T client_data) { + PendingRequestList copied_requests(pending_requests_); + for (typename PendingRequestList::const_iterator i = copied_requests.begin(); + i != copied_requests.end(); ++i) { + if (i->second == client_data) + i->first.provider->CancelRequest(i->first.handle); + } + copied_requests.clear(); +} + +template<class T> bool CancelableRequestConsumerTSimple<T>::GetFirstHandleForClientData( T client_data, CancelableRequestProvider::Handle* handle) { |