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

Side by Side Diff: chrome/browser/ui/touch/tabs/touch_tab_strip_controller.h

Issue 7065052: Improve large tab strip by leveraging touch icons when present (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed URL to ignore fragment and changed item handling Created 9 years, 6 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
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_STRIP_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_STRIP_CONTROLLER_H_
7 #pragma once
8
9 #include <map>
10 #include <vector>
11
12 #include "chrome/browser/favicon/favicon_service.h"
13 #include "chrome/browser/history/history.h"
14 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h"
15
16 // Subclassing BrowserTabStripController to provide touch specific behavior.
17 class TouchTabStripController: public BrowserTabStripController {
18 public:
19 TouchTabStripController(Browser* browser, TabStripModel* model);
20 virtual ~TouchTabStripController();
21
22 virtual void TabChangedAt(TabContentsWrapper* contents,
23 int model_index,
24 TabChangeType change_type) OVERRIDE;
25
26 protected:
27 virtual void SetTabRendererDataFromModel(TabContents* contents,
28 int model_index,
29 TabRendererData* data) OVERRIDE;
30
31 private:
32 void OnTouchIconAvailable(FaviconService::Handle h,
33 history::FaviconData favicon);
34
35 // A vector of all GURL requests and the model index to be refreshed
36 typedef std::pair<GURL, int> RequestInfo;
sky 2011/06/10 15:38:18 typedefs should be first in a section (http://www.
Emmanuel Saint-loubert-Bié 2011/06/10 16:09:10 sorry I did cut and paste from another similar dec
37 std::vector<RequestInfo> gurl_vector_;
38
39 typedef std::map<GURL, SkBitmap> TouchIconMap;
40 TouchIconMap touch_icon_map_;
41
42 // Our consumer for touch icon requests (takes gurl_vector_ index as data)
43 CancelableRequestConsumerT<int, 0> consumer_;
44
45 DISALLOW_COPY_AND_ASSIGN(TouchTabStripController);
46 };
47
48 #endif // CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_STRIP_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698