Index: chrome/browser/ui/views/sidebar/sidebar_tab_strip.h |
=================================================================== |
--- chrome/browser/ui/views/sidebar/sidebar_tab_strip.h (revision 0) |
+++ chrome/browser/ui/views/sidebar/sidebar_tab_strip.h (revision 0) |
@@ -0,0 +1,57 @@ |
+// Copyright (c) 2010 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_VIEWS_SIDEBAR_SIDEBAR_TAB_STRIP_H_ |
+#define CHROME_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_TAB_STRIP_H_ |
+#pragma once |
+ |
+#include "base/compiler_specific.h" |
+#include "base/ref_counted.h" |
+#include "chrome/browser/ui/views/sidebar/sidebar_base_tab_strip.h" |
+#include "ui/base/animation/animation_container.h" |
+ |
+namespace gfx { |
+class Point; |
+} // namespace gfx |
+ |
+// A view that represents the sidebar mini tabs fro the current;y displayed |
+// page. It acts as a container for SidebarTab instances, it is responsible |
+// for creating them and for the actual layout (SidebarBaseTabStrip does not |
+// make layout decisions). |
+class SidebarTabStrip : public SidebarBaseTabStrip { |
+ public: |
+ explicit SidebarTabStrip(SidebarTabStripController* controller); |
+ virtual ~SidebarTabStrip(); |
+ |
+ // views::View overrides: |
+ virtual void Layout() OVERRIDE; |
+ virtual views::View* GetViewForPoint(const gfx::Point& point) OVERRIDE; |
+ virtual views::View* GetViewByID(int id) const OVERRIDE; |
+ virtual AccessibilityTypes::Role GetAccessibleRole() OVERRIDE; |
+ virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; |
+ |
+ protected: |
+ // SidebarBaseTabStrip overrides: |
+ virtual SidebarBaseTab* CreateTab(); |
+ virtual void StartInsertTabAnimation(int model_index); |
+ virtual void StartRemoveTabAnimation(int model_index); |
+ // Generates the ideal bounds of the SidebarTabStrip when all tabs have |
+ // finished animating to their desired position/bounds. |
+ virtual void GenerateIdealBounds(); |
+ |
+ private: |
+ // Returns true if the specified point in SidebarTabStrip coords is within |
+ // the hit-test region of the specified SidebarBaseTab. |
+ bool IsPointInTab(SidebarBaseTab* tab, |
+ const gfx::Point& point_in_tab_strip_coords); |
+ |
+ // To ensure all tabs pulse at the same time they share the same animation |
+ // container. This is that animation container. |
+ scoped_refptr<ui::AnimationContainer> animation_container_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(SidebarTabStrip); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_TAB_STRIP_H_ |
+ |
Property changes on: chrome\browser\ui\views\sidebar\sidebar_tab_strip.h |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |