| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_VIEWS_ASH_TAB_SCRUBBER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_TAB_SCRUBBER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_ASH_TAB_SCRUBBER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_ASH_TAB_SCRUBBER_H_ |
| 7 | 7 |
| 8 #include "base/timer/timer.h" | 8 #include "base/timer/timer.h" |
| 9 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 9 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
| 10 #include "chrome/browser/ui/views/tabs/tab_strip_observer.h" | 10 #include "chrome/browser/ui/views/tabs/tab_strip_observer.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 int activation_delay() const { return activation_delay_; } | 45 int activation_delay() const { return activation_delay_; } |
| 46 int highlighted_tab() const { return highlighted_tab_; } | 46 int highlighted_tab() const { return highlighted_tab_; } |
| 47 bool IsActivationPending(); | 47 bool IsActivationPending(); |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 TabScrubber(); | 50 TabScrubber(); |
| 51 virtual ~TabScrubber(); | 51 virtual ~TabScrubber(); |
| 52 | 52 |
| 53 // ui::EventHandler overrides: | 53 // ui::EventHandler overrides: |
| 54 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; | 54 virtual void OnScrollEvent(ui::ScrollEvent* event) override; |
| 55 | 55 |
| 56 // content::NotificationObserver overrides: | 56 // content::NotificationObserver overrides: |
| 57 virtual void Observe(int type, | 57 virtual void Observe(int type, |
| 58 const content::NotificationSource& source, | 58 const content::NotificationSource& source, |
| 59 const content::NotificationDetails& details) OVERRIDE; | 59 const content::NotificationDetails& details) override; |
| 60 | 60 |
| 61 // TabStripObserver overrides. | 61 // TabStripObserver overrides. |
| 62 virtual void TabStripAddedTabAt(TabStrip* tab_strip, int index) OVERRIDE; | 62 virtual void TabStripAddedTabAt(TabStrip* tab_strip, int index) override; |
| 63 virtual void TabStripMovedTab(TabStrip* tab_strip, | 63 virtual void TabStripMovedTab(TabStrip* tab_strip, |
| 64 int from_index, | 64 int from_index, |
| 65 int to_index) OVERRIDE; | 65 int to_index) override; |
| 66 virtual void TabStripRemovedTabAt(TabStrip* tab_strip, int index) OVERRIDE; | 66 virtual void TabStripRemovedTabAt(TabStrip* tab_strip, int index) override; |
| 67 virtual void TabStripDeleted(TabStrip* tab_strip) OVERRIDE; | 67 virtual void TabStripDeleted(TabStrip* tab_strip) override; |
| 68 | 68 |
| 69 Browser* GetActiveBrowser(); | 69 Browser* GetActiveBrowser(); |
| 70 void FinishScrub(bool activate); | 70 void FinishScrub(bool activate); |
| 71 | 71 |
| 72 // Are we currently scrubbing?. | 72 // Are we currently scrubbing?. |
| 73 bool scrubbing_; | 73 bool scrubbing_; |
| 74 // The last browser we used for scrubbing, NULL if |scrubbing_| is | 74 // The last browser we used for scrubbing, NULL if |scrubbing_| is |
| 75 // false and there is no pending work. | 75 // false and there is no pending work. |
| 76 Browser* browser_; | 76 Browser* browser_; |
| 77 // The current accumulated x and y positions of a swipe, in | 77 // The current accumulated x and y positions of a swipe, in |
| (...skipping 13 matching lines...) Expand all Loading... |
| 91 // Forces the tabs to be revealed if we are in immersive fullscreen. | 91 // Forces the tabs to be revealed if we are in immersive fullscreen. |
| 92 scoped_ptr<ImmersiveRevealedLock> immersive_reveal_lock_; | 92 scoped_ptr<ImmersiveRevealedLock> immersive_reveal_lock_; |
| 93 | 93 |
| 94 content::NotificationRegistrar registrar_; | 94 content::NotificationRegistrar registrar_; |
| 95 base::WeakPtrFactory<TabScrubber> weak_ptr_factory_; | 95 base::WeakPtrFactory<TabScrubber> weak_ptr_factory_; |
| 96 | 96 |
| 97 DISALLOW_COPY_AND_ASSIGN(TabScrubber); | 97 DISALLOW_COPY_AND_ASSIGN(TabScrubber); |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 #endif // CHROME_BROWSER_UI_VIEWS_ASH_TAB_SCRUBBER_H_ | 100 #endif // CHROME_BROWSER_UI_VIEWS_ASH_TAB_SCRUBBER_H_ |
| OLD | NEW |