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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 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_VIEWS_SIDEBAR_SIDEBAR_TAB_STRIP_H_
6 #define CHROME_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_TAB_STRIP_H_
7 #pragma once
8
9 #include "base/compiler_specific.h"
10 #include "base/ref_counted.h"
11 #include "chrome/browser/ui/views/sidebar/sidebar_base_tab_strip.h"
12 #include "ui/base/animation/animation_container.h"
13
14 namespace gfx {
15 class Point;
16 } // namespace gfx
17
18 // A view that represents the sidebar mini tabs fro the current;y displayed
19 // page. It acts as a container for SidebarTab instances, it is responsible
20 // for creating them and for the actual layout (SidebarBaseTabStrip does not
21 // make layout decisions).
22 class SidebarTabStrip : public SidebarBaseTabStrip {
23 public:
24 explicit SidebarTabStrip(SidebarTabStripController* controller);
25 virtual ~SidebarTabStrip();
26
27 // views::View overrides:
28 virtual void Layout() OVERRIDE;
29 virtual views::View* GetViewForPoint(const gfx::Point& point) OVERRIDE;
30 virtual views::View* GetViewByID(int id) const OVERRIDE;
31 virtual AccessibilityTypes::Role GetAccessibleRole() OVERRIDE;
32 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE;
33
34 protected:
35 // SidebarBaseTabStrip overrides:
36 virtual SidebarBaseTab* CreateTab();
37 virtual void StartInsertTabAnimation(int model_index);
38 virtual void StartRemoveTabAnimation(int model_index);
39 // Generates the ideal bounds of the SidebarTabStrip when all tabs have
40 // finished animating to their desired position/bounds.
41 virtual void GenerateIdealBounds();
42
43 private:
44 // Returns true if the specified point in SidebarTabStrip coords is within
45 // the hit-test region of the specified SidebarBaseTab.
46 bool IsPointInTab(SidebarBaseTab* tab,
47 const gfx::Point& point_in_tab_strip_coords);
48
49 // To ensure all tabs pulse at the same time they share the same animation
50 // container. This is that animation container.
51 scoped_refptr<ui::AnimationContainer> animation_container_;
52
53 DISALLOW_COPY_AND_ASSIGN(SidebarTabStrip);
54 };
55
56 #endif // CHROME_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_TAB_STRIP_H_
57
OLDNEW
« 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