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

Side by Side Diff: athena/wm/split_view_controller.h

Issue 694883002: Do not allow split view to be engaged by a bezel gesture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « athena/wm/bezel_controller.cc ('k') | athena/wm/split_view_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ 5 #ifndef ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_
6 #define ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ 6 #define ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_
7 7
8 #include "athena/athena_export.h" 8 #include "athena/athena_export.h"
9 #include "athena/util/drag_handle.h" 9 #include "athena/util/drag_handle.h"
10 #include "athena/wm/bezel_controller.h"
11 #include "athena/wm/public/window_list_provider_observer.h" 10 #include "athena/wm/public/window_list_provider_observer.h"
12 #include "athena/wm/public/window_manager_observer.h" 11 #include "athena/wm/public/window_manager_observer.h"
13 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
15 14
16 namespace gfx { 15 namespace gfx {
17 class Rect; 16 class Rect;
18 class Transform; 17 class Transform;
19 } 18 }
20 19
21 namespace aura { 20 namespace aura {
22 class ScopedWindowTargeter; 21 class ScopedWindowTargeter;
23 class Window; 22 class Window;
24 class WindowTargeter; 23 class WindowTargeter;
25 } 24 }
26 25
27 namespace views { 26 namespace views {
28 class ViewTargeterDelegate; 27 class ViewTargeterDelegate;
29 class Widget; 28 class Widget;
30 } 29 }
31 30
32 namespace athena { 31 namespace athena {
33 class SplitViewControllerTest; 32 class SplitViewControllerTest;
34 class WindowListProviderImpl; 33 class WindowListProviderImpl;
35 34
36 // Responsible for entering split view mode, exiting from split view mode, and 35 // Responsible for entering split view mode, exiting from split view mode, and
37 // laying out the windows in split view mode. 36 // laying out the windows in split view mode.
38 class ATHENA_EXPORT SplitViewController 37 class ATHENA_EXPORT SplitViewController
39 : public BezelController::ScrollDelegate, 38 : public DragHandleScrollDelegate,
40 public DragHandleScrollDelegate,
41 public WindowManagerObserver, 39 public WindowManagerObserver,
42 public WindowListProviderObserver { 40 public WindowListProviderObserver {
43 public: 41 public:
44 SplitViewController(aura::Window* container, 42 SplitViewController(aura::Window* container,
45 WindowListProviderImpl* window_list_provider); 43 WindowListProviderImpl* window_list_provider);
46 44
47 ~SplitViewController() override; 45 ~SplitViewController() override;
48 46
49 bool CanActivateSplitViewMode() const; 47 bool CanActivateSplitViewMode() const;
50 bool IsSplitViewModeActive() const; 48 bool IsSplitViewModeActive() const;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 void OnAnimationCompleted(); 108 void OnAnimationCompleted();
111 109
112 // Returns the default divider position for when the split view mode is 110 // Returns the default divider position for when the split view mode is
113 // active and the divider is not being dragged. 111 // active and the divider is not being dragged.
114 int GetDefaultDividerPosition(); 112 int GetDefaultDividerPosition();
115 113
116 // Access to constants in anonymous namespace for testing purposes. 114 // Access to constants in anonymous namespace for testing purposes.
117 float GetMaxDistanceFromMiddleForTest() const; 115 float GetMaxDistanceFromMiddleForTest() const;
118 float GetMinFlingVelocityForTest() const; 116 float GetMinFlingVelocityForTest() const;
119 117
120 // BezelController::ScrollDelegate:
121 void BezelScrollBegin(BezelController::Bezel bezel, float delta) override;
122 void BezelScrollEnd(float velocity) override;
123 void BezelScrollUpdate(float delta) override;
124 bool BezelCanScroll() override;
125
126 // DragHandleScrollDelegate: 118 // DragHandleScrollDelegate:
127 void HandleScrollBegin(float delta) override; 119 void HandleScrollBegin(float delta) override;
128 void HandleScrollEnd(float velocity) override; 120 void HandleScrollEnd(float velocity) override;
129 void HandleScrollUpdate(float delta) override; 121 void HandleScrollUpdate(float delta) override;
130 122
131 // WindowManagerObserver: 123 // WindowManagerObserver:
132 void OnOverviewModeEnter() override; 124 void OnOverviewModeEnter() override;
133 void OnOverviewModeExit() override; 125 void OnOverviewModeExit() override;
134 void OnSplitViewModeEnter() override; 126 void OnSplitViewModeEnter() override;
135 void OnSplitViewModeExit() override; 127 void OnSplitViewModeExit() override;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 std::vector<aura::Window*> to_hide_; 167 std::vector<aura::Window*> to_hide_;
176 168
177 base::WeakPtrFactory<SplitViewController> weak_factory_; 169 base::WeakPtrFactory<SplitViewController> weak_factory_;
178 170
179 DISALLOW_COPY_AND_ASSIGN(SplitViewController); 171 DISALLOW_COPY_AND_ASSIGN(SplitViewController);
180 }; 172 };
181 173
182 } // namespace athena 174 } // namespace athena
183 175
184 #endif // ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ 176 #endif // ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « athena/wm/bezel_controller.cc ('k') | athena/wm/split_view_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698