Chromium Code Reviews| Index: chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.h |
| diff --git a/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.h b/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.h |
| index 9c14e7f08a5eeec902052a6d15d4849901379249..e7d89dd6997a031e51bd725024530f6e1d0e8256 100644 |
| --- a/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.h |
| +++ b/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.h |
| @@ -6,17 +6,58 @@ |
| #define CHROME_BROWSER_UI_VIEWS_FRAME_SCROLL_END_EFFECT_CONTROLLER_ASH_H_ |
| #include "base/compiler_specific.h" |
| +#include "base/memory/scoped_ptr.h" |
| #include "chrome/browser/ui/views/frame/scroll_end_effect_controller.h" |
| +#include "ui/compositor/layer.h" |
| +#include "ui/gfx/rect.h" |
| + |
| +namespace views { |
| +class View; |
| +} |
| class ScrollEndEffectControllerAsh : public ScrollEndEffectController { |
| public: |
| - ScrollEndEffectControllerAsh(); |
| + explicit ScrollEndEffectControllerAsh(BrowserView* view); |
| virtual ~ScrollEndEffectControllerAsh(); |
| // ScrollEndEffectController overides: |
| virtual void OverscrollUpdate(int delta_y) OVERRIDE; |
| private: |
| + // Set up the layer topology for showing the effect. This involves making sure |
|
sadrul
2013/08/20 16:14:59
Sets up
rharrison
2013/08/20 19:57:41
Done.
|
| + // everything is on a layer and inserting clipping layers into the topology. |
| + void ActivateEffect(); |
| + |
| + // Restore the layer topology and states to what they were before the effect |
|
sadrul
2013/08/20 16:14:59
Restores
rharrison
2013/08/20 19:57:41
Done.
|
| + // was actived. |
| + void DeactivateEffect(); |
| + |
| + void ApplyDelta(ui::Layer* frame, gfx::Rect bounds, int delta_y); |
| + |
| + BrowserView* browser_view_; // non-owned |
| + bool is_effect_active_; |
| + |
| + scoped_ptr<ui::Layer> frame_clipping_layer_; |
| + scoped_ptr<ui::Layer> web_clipping_layer_; |
| + ui::Layer* browser_frame_layer_; // non-owned |
| + ui::Layer* web_contents_layer_; // non-owned |
| + ui::Layer* non_client_layer_; // non-owned |
| + |
| + // Height of the top of the window that needs to be not be occluded by the |
| + // |web_clipping_layer_| so that things like the controls show through.| |
| + int non_content_height_; |
| + |
| + // Used to reparent |web_contents_layer_| when deactivating the effect. |
| + ui::Layer* web_contents_parent_; // non-owned |
| + |
| + // Saved when the effective is activated, so it can be restored when the |
| + // effect is deactivated. |
| + gfx::Rect web_contents_bounds_; |
| + |
| + // Used to turn off being on a layer when deactivating the effect. |
| + views::View* non_client_view_; // non-owned |
| + |
| + |
| DISALLOW_COPY_AND_ASSIGN(ScrollEndEffectControllerAsh); |
| }; |