| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ |
| 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ | 6 #define CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ |
| 7 | 7 |
| 8 #include "app/animation_container.h" | 8 #include "app/animation_container.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // in response to dragged tabs. | 38 // in response to dragged tabs. |
| 39 // | 39 // |
| 40 /////////////////////////////////////////////////////////////////////////////// | 40 /////////////////////////////////////////////////////////////////////////////// |
| 41 class TabStrip : public BaseTabStrip, | 41 class TabStrip : public BaseTabStrip, |
| 42 public views::ButtonListener, | 42 public views::ButtonListener, |
| 43 public MessageLoopForUI::Observer { | 43 public MessageLoopForUI::Observer { |
| 44 public: | 44 public: |
| 45 explicit TabStrip(TabStripController* controller); | 45 explicit TabStrip(TabStripController* controller); |
| 46 virtual ~TabStrip(); | 46 virtual ~TabStrip(); |
| 47 | 47 |
| 48 // Set whether the new tab button is enabled. | |
| 49 void set_new_tab_button_enabled(bool enabled) { | |
| 50 new_tab_button_enabled_ = enabled; | |
| 51 } | |
| 52 | |
| 53 // Returns whether the new tab button is enabled. | |
| 54 bool new_tab_button_enabled() { | |
| 55 return new_tab_button_enabled_; | |
| 56 } | |
| 57 | |
| 58 // Creates the new tab button. | 48 // Creates the new tab button. |
| 59 void InitTabStripButtons(); | 49 void InitTabStripButtons(); |
| 60 | 50 |
| 61 // Returns the bounds of the new tab button. | 51 // Returns the bounds of the new tab button. |
| 62 gfx::Rect GetNewTabButtonBounds(); | 52 gfx::Rect GetNewTabButtonBounds(); |
| 63 | 53 |
| 64 // BaseTabStrip implementation: | 54 // BaseTabStrip implementation: |
| 65 virtual int GetPreferredHeight(); | 55 virtual int GetPreferredHeight(); |
| 66 virtual void SetBackgroundOffset(const gfx::Point& offset); | 56 virtual void SetBackgroundOffset(const gfx::Point& offset); |
| 67 virtual bool IsPositionInWindowCaption(const gfx::Point& point); | 57 virtual bool IsPositionInWindowCaption(const gfx::Point& point); |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 // Valid for the lifetime of a drag over us. | 295 // Valid for the lifetime of a drag over us. |
| 306 scoped_ptr<DropInfo> drop_info_; | 296 scoped_ptr<DropInfo> drop_info_; |
| 307 | 297 |
| 308 // To ensure all tabs pulse at the same time they share the same animation | 298 // To ensure all tabs pulse at the same time they share the same animation |
| 309 // container. This is that animation container. | 299 // container. This is that animation container. |
| 310 scoped_refptr<AnimationContainer> animation_container_; | 300 scoped_refptr<AnimationContainer> animation_container_; |
| 311 | 301 |
| 312 // Used for stage 1 of new tab animation. | 302 // Used for stage 1 of new tab animation. |
| 313 base::OneShotTimer<TabStrip> new_tab_timer_; | 303 base::OneShotTimer<TabStrip> new_tab_timer_; |
| 314 | 304 |
| 315 // Whether the new tab button is being displayed. | |
| 316 bool new_tab_button_enabled_; | |
| 317 | |
| 318 DISALLOW_COPY_AND_ASSIGN(TabStrip); | 305 DISALLOW_COPY_AND_ASSIGN(TabStrip); |
| 319 }; | 306 }; |
| 320 | 307 |
| 321 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ | 308 #endif // CHROME_BROWSER_VIEWS_TABS_TAB_STRIP_H_ |
| OLD | NEW |