Chromium Code Reviews| Index: athena/wm/split_view_controller.h |
| diff --git a/athena/wm/split_view_controller.h b/athena/wm/split_view_controller.h |
| index e0652def1b19050b568964926916aee06aac731f..daa273760c09362c756d86dcd2a0d76156380138 100644 |
| --- a/athena/wm/split_view_controller.h |
| +++ b/athena/wm/split_view_controller.h |
| @@ -6,24 +6,76 @@ |
| #define ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ |
| #include "athena/wm/bezel_controller.h" |
| +#include "athena/wm/public/window_manager_observer.h" |
| +#include "athena/wm/window_overview_mode.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "ui/compositor/layer_animation_observer.h" |
|
Jun Mukai
2014/08/06 20:49:01
Is this include necessary here?
mfomitchev
2014/08/08 16:03:22
Leftover from old code, thanks for catching. Fixed
|
| + |
| +namespace gfx { |
| +class Transform; |
| +} |
| + |
| +namespace wm { |
| +class WindowListProvider; |
| +} |
| namespace athena { |
| +class WindowManager; |
| +class WindowOverviewModeDelegate; |
| // Responsible for entering split view mode, exiting from split view mode, and |
| // laying out the windows in split view mode. |
| -class SplitViewController : public BezelController::ScrollDelegate { |
| +class SplitViewController : public BezelController::ScrollDelegate, |
| + public WindowManagerObserver { |
| public: |
| - SplitViewController(); |
| virtual ~SplitViewController(); |
|
oshima
2014/08/06 21:54:09
move dtor after ctor
mfomitchev
2014/08/08 16:03:23
Done.
|
| + SplitViewController(aura::Window* container, |
| + wm::WindowListProvider* window_list_provider, |
| + WindowManager* window_manager); |
| + |
| + |
| + bool IsSplitViewModeActive(); |
| private: |
| + enum State {INACTIVE, SCROLLING, ACTIVE}; |
|
oshima
2014/08/06 21:54:09
document these states.
mfomitchev
2014/08/08 16:03:22
Done.
|
| + |
| + void Layout(bool animate); |
| + |
| + void SetWindowTransform( |
| + aura::Window* window, const gfx::Transform& transform, bool animate); |
| + |
| + void AnimationCompleted(); |
|
oshima
2014/08/06 21:54:10
OnAnimationCompleted ( to be consistent with patte
mfomitchev
2014/08/08 16:03:23
Done.
|
| + |
| + void UpdateSeparatorPositionFromScrollDelta(float delta); |
| + |
| + aura::Window* GetCurrentWindow(); |
|
oshima
2014/08/06 21:54:09
document what is *current* window. If it's active
mfomitchev
2014/08/08 16:03:22
I added comments. Unfortunately GetActiveWindow()
|
| + |
| // BezelController::ScrollDelegate overrides. |
| virtual void ScrollBegin(BezelController::Bezel bezel, float delta) OVERRIDE; |
| virtual void ScrollEnd() OVERRIDE; |
| virtual void ScrollUpdate(float delta) OVERRIDE; |
| virtual bool CanScroll() OVERRIDE; |
| + // WindowManagerObserver overrides |
|
oshima
2014/08/06 21:54:09
// WindowManagerObserver:
(no "overrides" require
mfomitchev
2014/08/08 16:03:23
Done.
|
| + virtual void OnOverviewModeEnter() OVERRIDE; |
| + virtual void OnOverviewModeExit() OVERRIDE; |
| + |
| + base::WeakPtrFactory<SplitViewController> weak_factory_; |
| + |
| + State state_; |
| + |
| + aura::Window* container_; |
| + WindowManager* window_manager_; |
| + wm::WindowListProvider* window_list_provider_; |
| + |
| + aura::Window* current_window_; |
| + aura::Window* left_window_; |
| + aura::Window* right_window_; |
| + // Position of the separator between left_window_ and right_window_ in |
|
oshima
2014/08/06 21:54:09
new line before comment
mfomitchev
2014/08/08 16:03:22
Done.
|
| + // container_ coordinates (along the x axis). |
| + int separator_position_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(SplitViewController); |
| }; |