| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_WEB_CONTENTS_AURA_WINDOW_SLIDER_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_AURA_WINDOW_SLIDER_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_WINDOW_SLIDER_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_WINDOW_SLIDER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void ResetSlide(); | 98 void ResetSlide(); |
| 99 | 99 |
| 100 // The following callbacks are triggered after an animation. | 100 // The following callbacks are triggered after an animation. |
| 101 void SlideAnimationCompleted(scoped_ptr<ui::Layer> layer, | 101 void SlideAnimationCompleted(scoped_ptr<ui::Layer> layer, |
| 102 scoped_ptr<ShadowLayerDelegate> shadow); | 102 scoped_ptr<ShadowLayerDelegate> shadow); |
| 103 | 103 |
| 104 void ResetSlideAnimationCompleted(scoped_ptr<ui::Layer> layer, | 104 void ResetSlideAnimationCompleted(scoped_ptr<ui::Layer> layer, |
| 105 scoped_ptr<ShadowLayerDelegate> shadow); | 105 scoped_ptr<ShadowLayerDelegate> shadow); |
| 106 | 106 |
| 107 // Overridden from ui::EventHandler: | 107 // Overridden from ui::EventHandler: |
| 108 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; | 108 virtual void OnKeyEvent(ui::KeyEvent* event) override; |
| 109 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 109 virtual void OnMouseEvent(ui::MouseEvent* event) override; |
| 110 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; | 110 virtual void OnScrollEvent(ui::ScrollEvent* event) override; |
| 111 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 111 virtual void OnGestureEvent(ui::GestureEvent* event) override; |
| 112 | 112 |
| 113 // Overridden from aura::WindowObserver: | 113 // Overridden from aura::WindowObserver: |
| 114 virtual void OnWindowRemovingFromRootWindow(aura::Window* window, | 114 virtual void OnWindowRemovingFromRootWindow(aura::Window* window, |
| 115 aura::Window* new_root) OVERRIDE; | 115 aura::Window* new_root) override; |
| 116 | 116 |
| 117 Delegate* delegate_; | 117 Delegate* delegate_; |
| 118 | 118 |
| 119 // The slider intercepts scroll events from this window. The slider does not | 119 // The slider intercepts scroll events from this window. The slider does not |
| 120 // own |event_window_|. If |event_window_| is destroyed, then the slider stops | 120 // own |event_window_|. If |event_window_| is destroyed, then the slider stops |
| 121 // listening for events, but it doesn't destroy itself. | 121 // listening for events, but it doesn't destroy itself. |
| 122 aura::Window* event_window_; | 122 aura::Window* event_window_; |
| 123 | 123 |
| 124 // The window the slider operates on. The lifetime of the slider is bound to | 124 // The window the slider operates on. The lifetime of the slider is bound to |
| 125 // this window (i.e. if |owner_| does, the slider destroys itself). The slider | 125 // this window (i.e. if |owner_| does, the slider destroys itself). The slider |
| (...skipping 21 matching lines...) Expand all Loading... |
| 147 const float complete_threshold_; | 147 const float complete_threshold_; |
| 148 | 148 |
| 149 base::WeakPtrFactory<WindowSlider> weak_factory_; | 149 base::WeakPtrFactory<WindowSlider> weak_factory_; |
| 150 | 150 |
| 151 DISALLOW_COPY_AND_ASSIGN(WindowSlider); | 151 DISALLOW_COPY_AND_ASSIGN(WindowSlider); |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 } // namespace content | 154 } // namespace content |
| 155 | 155 |
| 156 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_WINDOW_SLIDER_H_ | 156 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_WINDOW_SLIDER_H_ |
| OLD | NEW |