Chromium Code Reviews| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 // destroys itself. | 58 // destroys itself. |
| 59 WindowSlider(Delegate* delegate, | 59 WindowSlider(Delegate* delegate, |
| 60 aura::Window* event_window, | 60 aura::Window* event_window, |
| 61 aura::Window* owner); | 61 aura::Window* owner); |
| 62 | 62 |
| 63 virtual ~WindowSlider(); | 63 virtual ~WindowSlider(); |
| 64 | 64 |
| 65 // Changes the owner of the slider. | 65 // Changes the owner of the slider. |
| 66 void ChangeOwner(aura::Window* new_owner); | 66 void ChangeOwner(aura::Window* new_owner); |
| 67 | 67 |
| 68 bool SlideIsInProgress() const; | |
|
sky
2013/06/21 21:16:54
IsSlideInProgress?
sadrul
2013/06/21 23:48:53
Done.
| |
| 69 | |
| 68 private: | 70 private: |
| 69 // Sets up the slider layer correctly (sets the correct bounds of the layer, | 71 // Sets up the slider layer correctly (sets the correct bounds of the layer, |
| 70 // parents it to the right layer, and sets up the correct stacking order). | 72 // parents it to the right layer, and sets up the correct stacking order). |
| 71 void SetupSliderLayer(); | 73 void SetupSliderLayer(); |
| 72 | 74 |
| 73 void UpdateForScroll(float x_offset, float y_offset); | 75 void UpdateForScroll(float x_offset, float y_offset); |
| 74 | 76 |
| 75 void UpdateForFling(float x_velocity, float y_velocity); | 77 void UpdateForFling(float x_velocity, float y_velocity); |
| 76 | 78 |
| 77 // Resets any in-progress slide. | 79 // Resets any in-progress slide. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 | 123 |
| 122 const float min_start_threshold_; | 124 const float min_start_threshold_; |
| 123 const float complete_threshold_; | 125 const float complete_threshold_; |
| 124 | 126 |
| 125 DISALLOW_COPY_AND_ASSIGN(WindowSlider); | 127 DISALLOW_COPY_AND_ASSIGN(WindowSlider); |
| 126 }; | 128 }; |
| 127 | 129 |
| 128 } // namespace content | 130 } // namespace content |
| 129 | 131 |
| 130 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_WINDOW_SLIDER_H_ | 132 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_WINDOW_SLIDER_H_ |
| OLD | NEW |