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

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: removed extra line 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
11 #include "chrome/browser/favicon/favicon_service.h"
12 #include "chrome/browser/history/history.h"
13 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h"
14
15 class Profile;
16
17 // Subclassing BrowserTabStripController to provide touch specific behavior.
18 class TouchTabStripController: public BrowserTabStripController {
19 public:
20 TouchTabStripController(Browser* browser, TabStripModel* model);
21 virtual ~TouchTabStripController();
22
23 virtual void TabChangedAt(TabContentsWrapper* contents, int model_index,
sky 2011/06/09 16:53:00 nit: if you have to wrap, then put each param on i
Emmanuel Saint-loubert-Bié 2011/06/10 02:21:45 Done.
24 TabChangeType change_type) OVERRIDE;
25
26 void OnTouchIconAvailable(FaviconService::Handle h,
sky 2011/06/09 16:53:00 make this private.
Emmanuel Saint-loubert-Bié 2011/06/10 02:21:45 Done.
27 history::FaviconData favicon);
28
29 protected:
30 virtual void SetTabRendererDataFromModel(TabContents* contents,
31 int model_index, TabRendererData* data) OVERRIDE;
32
33 private:
34
sky 2011/06/09 16:53:00 nit: no newline here.
Emmanuel Saint-loubert-Bié 2011/06/10 02:21:45 Done.
35 // Profile obtained from Browser object in constructor.
36 Profile* profile_;
sky 2011/06/09 16:53:00 Remove this and make profile() in BrowserTabStripC
Emmanuel Saint-loubert-Bié 2011/06/10 02:21:45 Cool and done.
37
38 // Mapping of model index to URLS and URLs to Touch Icons
39 typedef std::map<int, GURL> ModelIndexMap;
sky 2011/06/09 16:53:00 If you cache by model index it means you have to t
Emmanuel Saint-loubert-Bié 2011/06/10 02:21:45 You are right of course using the model that way i
40 ModelIndexMap model_index_map_;
41 typedef std::map<GURL, SkBitmap> TouchIconMap;
42 TouchIconMap touch_icon_map_;
43
44 // Our consumer for touch icon requests (takes the model_index as data)
45 CancelableRequestConsumerT<int, 0> consumer_;
46
47 DISALLOW_COPY_AND_ASSIGN(TouchTabStripController);
48 };
49
50 #endif // CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_STRIP_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698