| Index: athena/wm/split_view_controller.h
|
| diff --git a/athena/wm/split_view_controller.h b/athena/wm/split_view_controller.h
|
| index e41b3892d205c0f8e816b04cd0bb49187094ea81..5e879185c9fc30b22eea790c9fe6b66f462021ee 100644
|
| --- a/athena/wm/split_view_controller.h
|
| +++ b/athena/wm/split_view_controller.h
|
| @@ -6,9 +6,7 @@
|
| #define ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_
|
|
|
| #include "athena/athena_export.h"
|
| -#include "athena/util/drag_handle.h"
|
| #include "athena/wm/bezel_controller.h"
|
| -#include "athena/wm/public/window_manager_observer.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/weak_ptr.h"
|
|
|
| @@ -17,26 +15,13 @@
|
| class Transform;
|
| }
|
|
|
| -namespace aura {
|
| -class ScopedWindowTargeter;
|
| -class Window;
|
| -class WindowTargeter;
|
| -}
|
| -
|
| -namespace views {
|
| -class ViewTargeterDelegate;
|
| -class Widget;
|
| -}
|
| -
|
| namespace athena {
|
| class WindowListProvider;
|
|
|
| // Responsible for entering split view mode, exiting from split view mode, and
|
| // laying out the windows in split view mode.
|
| class ATHENA_EXPORT SplitViewController
|
| - : public BezelController::ScrollDelegate,
|
| - public DragHandleScrollDelegate,
|
| - public WindowManagerObserver {
|
| + : public BezelController::ScrollDelegate {
|
| public:
|
| SplitViewController(aura::Window* container,
|
| WindowListProvider* window_list_provider);
|
| @@ -60,10 +45,12 @@
|
| void ReplaceWindow(aura::Window* window,
|
| aura::Window* replace_with);
|
|
|
| - // Returns the bounds of the left and right parts of the |container_| based
|
| - // on the current value of |divider_position_|.
|
| - gfx::Rect GetLeftAreaBounds();
|
| - gfx::Rect GetRightAreaBounds();
|
| + // Returns the bounds that the left and right windows will have once split
|
| + // view is active and they are done animating. If |left_window_| and
|
| + // |right_window_| are still animating this may be different than their
|
| + // current bounds.
|
| + gfx::Rect GetLeftTargetBounds();
|
| + gfx::Rect GetRightTargetBounds();
|
|
|
| aura::Window* left_window() { return left_window_; }
|
| aura::Window* right_window() { return right_window_; }
|
| @@ -74,7 +61,7 @@
|
| // NULL.
|
| INACTIVE,
|
| // Two windows |left_window_| and |right_window| are shown side by side and
|
| - // there is a horizontal scroll in progress which is dragging the divider
|
| + // there is a horizontal scroll in progress which is dragging the separator
|
| // between the two windows.
|
| SCROLLING,
|
| // Split View mode is active with |left_window_| and |right_window| showing
|
| @@ -83,42 +70,22 @@
|
| };
|
|
|
| void SetState(State state);
|
| -
|
| - void InitializeDivider();
|
| - void HideDivider();
|
| - void ShowDivider();
|
| -
|
| void UpdateLayout(bool animate);
|
|
|
| void SetWindowTransforms(const gfx::Transform& left_transform,
|
| const gfx::Transform& right_transform,
|
| - const gfx::Transform& divider_transform,
|
| bool animate);
|
|
|
| // Called when the animation initiated by SetWindowTransforms() completes.
|
| void OnAnimationCompleted();
|
|
|
| - // Returns the default divider position for when the split view mode is
|
| - // active and the divider is not being dragged.
|
| - int GetDefaultDividerPosition();
|
| + void UpdateSeparatorPositionFromScrollDelta(float delta);
|
|
|
| // BezelController::ScrollDelegate:
|
| - virtual void BezelScrollBegin(BezelController::Bezel bezel,
|
| - float delta) OVERRIDE;
|
| - virtual void BezelScrollEnd() OVERRIDE;
|
| - virtual void BezelScrollUpdate(float delta) OVERRIDE;
|
| - virtual bool BezelCanScroll() OVERRIDE;
|
| -
|
| - // DragHandleScrollDelegate:
|
| - virtual void HandleScrollBegin(float delta) OVERRIDE;
|
| - virtual void HandleScrollEnd() OVERRIDE;
|
| - virtual void HandleScrollUpdate(float delta) OVERRIDE;
|
| -
|
| - // WindowManagerObserver:
|
| - virtual void OnOverviewModeEnter() OVERRIDE;
|
| - virtual void OnOverviewModeExit() OVERRIDE;
|
| - virtual void OnSplitViewModeEnter() OVERRIDE;
|
| - virtual void OnSplitViewModeExit() OVERRIDE;
|
| + virtual void ScrollBegin(BezelController::Bezel bezel, float delta) OVERRIDE;
|
| + virtual void ScrollEnd() OVERRIDE;
|
| + virtual void ScrollUpdate(float delta) OVERRIDE;
|
| + virtual bool CanScroll() OVERRIDE;
|
|
|
| State state_;
|
|
|
| @@ -132,23 +99,9 @@
|
| aura::Window* left_window_;
|
| aura::Window* right_window_;
|
|
|
| - // X-Coordinate of the (center of the) divider between left_window_ and
|
| - // right_window_ in |container_| coordinates.
|
| - int divider_position_;
|
| -
|
| - // Meaningful only when state_ is SCROLLING.
|
| - // X-Coordinate of the divider when the scroll started.
|
| - int divider_scroll_start_position_;
|
| -
|
| - // Visually separates the windows and contains the drag handle.
|
| - views::Widget* divider_widget_;
|
| -
|
| - // The drag handle which can be used when split view is active to exit the
|
| - // split view mode.
|
| - views::View* drag_handle_;
|
| -
|
| - scoped_ptr<aura::ScopedWindowTargeter> window_targeter_;
|
| - scoped_ptr<views::ViewTargeterDelegate> view_targeter_delegate_;
|
| + // Position of the separator between left_window_ and right_window_ in
|
| + // container_ coordinates (along the x axis).
|
| + int separator_position_;
|
|
|
| // Windows which should be hidden when the animation initiated by
|
| // UpdateLayout() completes.
|
|
|