OLD | NEW |
---|---|
(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_ | |
OLD | NEW |