Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5625)

Unified Diff: athena/wm/split_view_controller.h

Issue 420603011: Split Screen mode implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_view
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..de5ab93551da36ff9282ed27e753e3fd4ba9b2b7 100644
--- a/athena/wm/split_view_controller.h
+++ b/athena/wm/split_view_controller.h
@@ -6,24 +6,77 @@
#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 ui {
+class LayerAnimationSequence;
Jun Mukai 2014/07/25 20:21:29 Remove unused declaration
mfomitchev 2014/07/25 23:27:38 Done.
+}
namespace athena {
+class WindowManager;
+class WindowOverviewModeDelegate;
+class WindowStackProvider;
// 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,
+ WindowStackProvider* window_stack_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 {}
Jun Mukai 2014/07/25 20:21:29 Please move the implementation to .cc file even it
mfomitchev 2014/07/25 23:27:38 Done.
+
+ base::WeakPtrFactory<SplitViewController> weak_factory_;
+
+ State state_;
+
+ aura::Window* container_;
+ WindowManager* window_manager_;
+ WindowStackProvider* window_stack_provider_;
+
+ aura::Window* current_window_;
+ aura::Window* left_window_;
+ aura::Window* right_window_;
+ int separator_position_;
+
+ //scoped_ptr<CurrentWindowTracker> current_window_tracker_;
+
DISALLOW_COPY_AND_ASSIGN(SplitViewController);
};

Powered by Google App Engine
This is Rietveld 408576698