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 <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/timer/timer.h" | 11 #include "base/timer/timer.h" |
11 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 12 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
12 #include "chrome/browser/ui/views/tabs/tab_strip_observer.h" | 13 #include "chrome/browser/ui/views/tabs/tab_strip_observer.h" |
13 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
14 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
15 #include "ui/events/event_handler.h" | 16 #include "ui/events/event_handler.h" |
16 | 17 |
17 class Browser; | 18 class Browser; |
18 class Tab; | 19 class Tab; |
19 class TabStrip; | 20 class TabStrip; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 Direction swipe_direction_; | 101 Direction swipe_direction_; |
101 // The index of the tab that is currently highlighted. | 102 // The index of the tab that is currently highlighted. |
102 int highlighted_tab_; | 103 int highlighted_tab_; |
103 // Timer to control a delayed activation of the |highlighted_tab_|. | 104 // Timer to control a delayed activation of the |highlighted_tab_|. |
104 base::Timer activate_timer_; | 105 base::Timer activate_timer_; |
105 // Time to wait in ms before newly selected tab becomes active. | 106 // Time to wait in ms before newly selected tab becomes active. |
106 int activation_delay_; | 107 int activation_delay_; |
107 // Set if activation_delay had been explicitly set. | 108 // Set if activation_delay had been explicitly set. |
108 bool use_default_activation_delay_; | 109 bool use_default_activation_delay_; |
109 // Forces the tabs to be revealed if we are in immersive fullscreen. | 110 // Forces the tabs to be revealed if we are in immersive fullscreen. |
110 scoped_ptr<ImmersiveRevealedLock> immersive_reveal_lock_; | 111 std::unique_ptr<ImmersiveRevealedLock> immersive_reveal_lock_; |
111 | 112 |
112 content::NotificationRegistrar registrar_; | 113 content::NotificationRegistrar registrar_; |
113 base::WeakPtrFactory<TabScrubber> weak_ptr_factory_; | 114 base::WeakPtrFactory<TabScrubber> weak_ptr_factory_; |
114 | 115 |
115 DISALLOW_COPY_AND_ASSIGN(TabScrubber); | 116 DISALLOW_COPY_AND_ASSIGN(TabScrubber); |
116 }; | 117 }; |
117 | 118 |
118 #endif // CHROME_BROWSER_UI_VIEWS_ASH_TAB_SCRUBBER_H_ | 119 #endif // CHROME_BROWSER_UI_VIEWS_ASH_TAB_SCRUBBER_H_ |
OLD | NEW |