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

Unified Diff: chrome/browser/ui/views/sidebar/sidebar_tab_strip.h

Issue 6250141: Sidebar mini tabs UI (views version).... Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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/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
« no previous file with comments | « chrome/browser/ui/views/sidebar/sidebar_tab_renderer_data.h ('k') | chrome/browser/ui/views/sidebar/sidebar_tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698