| 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..88a77b568d1fbd3bfd2697d966989031a9226966 100644
|
| --- a/athena/wm/split_view_controller.h
|
| +++ b/athena/wm/split_view_controller.h
|
| @@ -6,24 +6,73 @@
|
| #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"
|
| +
|
| +namespace gfx {
|
| +class Transform;
|
| +}
|
|
|
| namespace athena {
|
| +class WindowListProvider;
|
| +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();
|
| + SplitViewController(aura::Window* container,
|
| + WindowListProvider* window_list_provider,
|
| + WindowManager* window_manager);
|
| +
|
| +
|
| + bool IsSplitViewModeActive();
|
|
|
| private:
|
| + enum State {INACTIVE, SCROLLING, ACTIVE};
|
| +
|
| + void Layout(bool animate);
|
| +
|
| + void SetWindowTransform(
|
| + aura::Window* window, const gfx::Transform& transform, bool animate);
|
| +
|
| + void AnimationCompleted();
|
| +
|
| + void UpdateSeparatorPositionFromScrollDelta(float delta);
|
| +
|
| + aura::Window* GetCurrentWindow();
|
| +
|
| // 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
|
| + virtual void OnOverviewModeEnter() OVERRIDE;
|
| + virtual void OnOverviewModeExit() OVERRIDE;
|
| +
|
| + base::WeakPtrFactory<SplitViewController> weak_factory_;
|
| +
|
| + State state_;
|
| +
|
| + aura::Window* container_;
|
| + WindowManager* window_manager_;
|
| + 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
|
| + // container_ coordinates (along the x axis).
|
| + int separator_position_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(SplitViewController);
|
| };
|
|
|
|
|