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..fdf94889c0d7981c863254e49333ef6018593285 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: |
+ // Sets up the layer topology for showing the effect. This involves making |
sky
2013/08/21 21:01:01
I don't think we've ever used topology for what th
rharrison
2013/08/22 15:08:39
Done.
|
+ // sure everything is on a layer and inserting clipping layers into the |
+ // topology. |
+ void ActivateEffect(); |
+ |
+ // Restores the layer topology and states to what they were before the effect |
+ // was actived. |
+ void DeactivateEffect(); |
+ |
+ void ApplyDelta(ui::Layer* frame, gfx::Rect bounds, int delta_y); |
sky
2013/08/21 21:01:01
const gfx::Rect& and add a description.
rharrison
2013/08/22 15:08:39
Done.
|
+ |
+ 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* 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.| |
sky
2013/08/21 21:01:01
nuke trailing |
rharrison
2013/08/22 15:08:39
Done.
|
+ 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 |
sky
2013/08/21 21:01:01
effective?
rharrison
2013/08/22 15:08:39
Done.
|
+ // 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); |
}; |