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

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

Issue 641683003: C++11 override style change for athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
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" 10 #include "athena/wm/bezel_controller.h"
(...skipping 24 matching lines...) Expand all
35 // 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
36 // laying out the windows in split view mode. 36 // laying out the windows in split view mode.
37 class ATHENA_EXPORT SplitViewController 37 class ATHENA_EXPORT SplitViewController
38 : public BezelController::ScrollDelegate, 38 : public BezelController::ScrollDelegate,
39 public DragHandleScrollDelegate, 39 public DragHandleScrollDelegate,
40 public WindowManagerObserver { 40 public WindowManagerObserver {
41 public: 41 public:
42 SplitViewController(aura::Window* container, 42 SplitViewController(aura::Window* container,
43 WindowListProvider* window_list_provider); 43 WindowListProvider* window_list_provider);
44 44
45 virtual ~SplitViewController(); 45 ~SplitViewController() override;
46 46
47 bool CanActivateSplitViewMode() const; 47 bool CanActivateSplitViewMode() const;
48 bool IsSplitViewModeActive() const; 48 bool IsSplitViewModeActive() const;
49 49
50 // Activates split-view mode with |left| and |right| windows. If |left| and/or 50 // Activates split-view mode with |left| and |right| windows. If |left| and/or
51 // |right| is NULL, then the first window in the window-list (which is neither 51 // |right| is NULL, then the first window in the window-list (which is neither
52 // |left| nor |right|) is selected instead. |to_activate| indicates which of 52 // |left| nor |right|) is selected instead. |to_activate| indicates which of
53 // |left| or |right| should be activated. If |to_activate| is NULL, the 53 // |left| or |right| should be activated. If |to_activate| is NULL, the
54 // currently active window is kept active if it is one of the split-view 54 // currently active window is kept active if it is one of the split-view
55 // windows. 55 // windows.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 // Returns the default divider position for when the split view mode is 109 // Returns the default divider position for when the split view mode is
110 // active and the divider is not being dragged. 110 // active and the divider is not being dragged.
111 int GetDefaultDividerPosition(); 111 int GetDefaultDividerPosition();
112 112
113 // Access to constants in anonymous namespace for testing purposes. 113 // Access to constants in anonymous namespace for testing purposes.
114 float GetMaxDistanceFromMiddleForTest() const; 114 float GetMaxDistanceFromMiddleForTest() const;
115 float GetMinFlingVelocityForTest() const; 115 float GetMinFlingVelocityForTest() const;
116 116
117 // BezelController::ScrollDelegate: 117 // BezelController::ScrollDelegate:
118 virtual void BezelScrollBegin(BezelController::Bezel bezel, 118 void BezelScrollBegin(BezelController::Bezel bezel,
119 float delta) override; 119 float delta) override;
120 virtual void BezelScrollEnd(float velocity) override; 120 void BezelScrollEnd(float velocity) override;
121 virtual void BezelScrollUpdate(float delta) override; 121 void BezelScrollUpdate(float delta) override;
122 virtual bool BezelCanScroll() override; 122 bool BezelCanScroll() override;
123 123
124 // DragHandleScrollDelegate: 124 // DragHandleScrollDelegate:
125 virtual void HandleScrollBegin(float delta) override; 125 void HandleScrollBegin(float delta) override;
126 virtual void HandleScrollEnd(float velocity) override; 126 void HandleScrollEnd(float velocity) override;
127 virtual void HandleScrollUpdate(float delta) override; 127 void HandleScrollUpdate(float delta) override;
128 128
129 // WindowManagerObserver: 129 // WindowManagerObserver:
130 virtual void OnOverviewModeEnter() override; 130 void OnOverviewModeEnter() override;
131 virtual void OnOverviewModeExit() override; 131 void OnOverviewModeExit() override;
132 virtual void OnSplitViewModeEnter() override; 132 void OnSplitViewModeEnter() override;
133 virtual void OnSplitViewModeExit() override; 133 void OnSplitViewModeExit() override;
134 134
135 State state_; 135 State state_;
136 136
137 aura::Window* container_; 137 aura::Window* container_;
138 138
139 // Provider of the list of windows to cycle through. Not owned. 139 // Provider of the list of windows to cycle through. Not owned.
140 WindowListProvider* window_list_provider_; 140 WindowListProvider* window_list_provider_;
141 141
142 // Windows for the left and right activities shown in SCROLLING and ACTIVE 142 // Windows for the left and right activities shown in SCROLLING and ACTIVE
143 // states. In INACTIVE state these are NULL. 143 // states. In INACTIVE state these are NULL.
(...skipping 23 matching lines...) Expand all
167 std::vector<aura::Window*> to_hide_; 167 std::vector<aura::Window*> to_hide_;
168 168
169 base::WeakPtrFactory<SplitViewController> weak_factory_; 169 base::WeakPtrFactory<SplitViewController> weak_factory_;
170 170
171 DISALLOW_COPY_AND_ASSIGN(SplitViewController); 171 DISALLOW_COPY_AND_ASSIGN(SplitViewController);
172 }; 172 };
173 173
174 } // namespace athena 174 } // namespace athena
175 175
176 #endif // ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_ 176 #endif // ATHENA_WM_SPLIT_VIEW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698