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

Unified 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: ' 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/touch/tabs/touch_tab_strip_controller.h
diff --git a/chrome/browser/ui/touch/tabs/touch_tab_strip_controller.h b/chrome/browser/ui/touch/tabs/touch_tab_strip_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..15e5fe1fc7d8421a05df0c69d6e6132d8eca1ee4
--- /dev/null
+++ b/chrome/browser/ui/touch/tabs/touch_tab_strip_controller.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_STRIP_CONTROLLER_H_
+#define CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_STRIP_CONTROLLER_H_
+#pragma once
+
+#include <map>
+#include <vector>
+
+#include "chrome/browser/favicon/favicon_service.h"
+#include "chrome/browser/history/history.h"
+#include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h"
+
+class TouchTab;
+
+// Subclassing BrowserTabStripController to provide touch specific behavior.
+class TouchTabStripController: public BrowserTabStripController {
+ public:
+ TouchTabStripController(Browser* browser, TabStripModel* model);
+ virtual ~TouchTabStripController();
+
+ virtual void TabChangedAt(TabContentsWrapper* contents,
sky 2011/06/16 15:43:41 You'll also want to override TabDetachedAt and rem
Emmanuel Saint-loubert-Bié 2011/06/17 00:01:44 Done.
+ int model_index,
+ TabChangeType change_type) OVERRIDE;
+
+ protected:
+ virtual void SetTabRendererDataFromModel(TabContents* contents,
+ int model_index,
+ TabRendererData* data,
+ bool new_tab) OVERRIDE;
+
+ private:
+ void OnTouchIconAvailable(FaviconService::Handle h,
+ history::FaviconData favicon);
+
+ // Our consumer for touch icon requests
+ CancelableRequestConsumerTSimple<TouchTab*> consumer_;
+
+ DISALLOW_COPY_AND_ASSIGN(TouchTabStripController);
+};
+
+#endif // CHROME_BROWSER_UI_TOUCH_TABS_TOUCH_TAB_STRIP_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698