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

Side by Side Diff: ash/shelf/shelf_layout_manager.h

Issue 2053113002: Replaced BackgroundAnimator with ShelfBackgroundAnimator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made the ShelfView add/remove itself as an observer from the ShelfBackgroundAnimator. Created 4 years, 4 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ 5 #ifndef ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
6 #define ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ 6 #define ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 193
194 template <typename T> 194 template <typename T>
195 T PrimaryAxisValue(T horizontal, T vertical) const { 195 T PrimaryAxisValue(T horizontal, T vertical) const {
196 return IsHorizontalAlignment() ? horizontal : vertical; 196 return IsHorizontalAlignment() ? horizontal : vertical;
197 } 197 }
198 198
199 // Is the shelf's alignment horizontal? 199 // Is the shelf's alignment horizontal?
200 bool IsHorizontalAlignment() const; 200 bool IsHorizontalAlignment() const;
201 201
202 // Returns how the shelf background is painted.
203 ShelfBackgroundType GetShelfBackgroundType() const;
204
202 // Set the height of the ChromeVox panel, which takes away space from the 205 // Set the height of the ChromeVox panel, which takes away space from the
203 // available work area from the top of the screen. 206 // available work area from the top of the screen.
204 void SetChromeVoxPanelHeight(int height); 207 void SetChromeVoxPanelHeight(int height);
205 208
206 private: 209 private:
207 class AutoHideEventFilter; 210 class AutoHideEventFilter;
208 class RootWindowControllerObserverImpl; 211 class RootWindowControllerObserverImpl;
209 class UpdateShelfObserver; 212 class UpdateShelfObserver;
210 friend class AshPopupAlignmentDelegateTest; 213 friend class AshPopupAlignmentDelegateTest;
211 friend class ash::ScreenAsh; 214 friend class ash::ScreenAsh;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // Calculates the target bounds assuming visibility of |visible|. 274 // Calculates the target bounds assuming visibility of |visible|.
272 void CalculateTargetBounds(const State& state, TargetBounds* target_bounds); 275 void CalculateTargetBounds(const State& state, TargetBounds* target_bounds);
273 276
274 // Updates the target bounds if a gesture-drag is in progress. This is only 277 // Updates the target bounds if a gesture-drag is in progress. This is only
275 // used by |CalculateTargetBounds()|. 278 // used by |CalculateTargetBounds()|.
276 void UpdateTargetBoundsForGesture(TargetBounds* target_bounds) const; 279 void UpdateTargetBoundsForGesture(TargetBounds* target_bounds) const;
277 280
278 // Updates the background of the shelf. 281 // Updates the background of the shelf.
279 void UpdateShelfBackground(BackgroundAnimatorChangeType type); 282 void UpdateShelfBackground(BackgroundAnimatorChangeType type);
280 283
281 // Returns how the shelf background is painted.
282 ShelfBackgroundType GetShelfBackgroundType() const;
283
284 // Updates the auto hide state immediately. 284 // Updates the auto hide state immediately.
285 void UpdateAutoHideStateNow(); 285 void UpdateAutoHideStateNow();
286 286
287 // Stops the auto hide timer and clears 287 // Stops the auto hide timer and clears
288 // |mouse_over_shelf_when_auto_hide_timer_started_|. 288 // |mouse_over_shelf_when_auto_hide_timer_started_|.
289 void StopAutoHideTimer(); 289 void StopAutoHideTimer();
290 290
291 // Returns the bounds of an additional region which can trigger showing the 291 // Returns the bounds of an additional region which can trigger showing the
292 // shelf. This region exists to make it easier to trigger showing the shelf 292 // shelf. This region exists to make it easier to trigger showing the shelf
293 // when the shelf is auto hidden and the shelf is on the boundary between 293 // when the shelf is auto hidden and the shelf is on the boundary between
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 394
395 std::unique_ptr<RootWindowControllerObserverImpl> 395 std::unique_ptr<RootWindowControllerObserverImpl>
396 root_window_controller_observer_; 396 root_window_controller_observer_;
397 397
398 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); 398 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
399 }; 399 };
400 400
401 } // namespace ash 401 } // namespace ash
402 402
403 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ 403 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
OLDNEW
« ash/shelf/shelf.h ('K') | « ash/shelf/shelf.cc ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698