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

Side by Side Diff: ash/common/shelf/wm_shelf.h

Issue 2228713003: mash: Convert ShelfView to wm common types, clean up Shelf access (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix control reaches end of non-void function warnings 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
« no previous file with comments | « ash/common/shelf/shelf_view.cc ('k') | ash/common/shelf/wm_shelf.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_COMMON_SHELF_WM_SHELF_H_ 5 #ifndef ASH_COMMON_SHELF_WM_SHELF_H_
6 #define ASH_COMMON_SHELF_WM_SHELF_H_ 6 #define ASH_COMMON_SHELF_WM_SHELF_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/shelf/shelf_types.h" 9 #include "ash/common/shelf/shelf_types.h"
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 // Used for accessing global state. 27 // Used for accessing global state.
28 class ASH_EXPORT WmShelf { 28 class ASH_EXPORT WmShelf {
29 public: 29 public:
30 // Returns the window showing the shelf. 30 // Returns the window showing the shelf.
31 virtual WmWindow* GetWindow() = 0; 31 virtual WmWindow* GetWindow() = 0;
32 32
33 virtual ShelfAlignment GetAlignment() const = 0; 33 virtual ShelfAlignment GetAlignment() const = 0;
34 virtual void SetAlignment(ShelfAlignment alignment) = 0; 34 virtual void SetAlignment(ShelfAlignment alignment) = 0;
35 35
36 // Returns true if the shelf alignment is horizontal (i.e. at the bottom).
37 bool IsHorizontalAlignment() const;
38
39 // Returns a value based on shelf alignment.
40 int SelectValueForShelfAlignment(int bottom, int left, int right) const;
41
42 // Returns |horizontal| is shelf is horizontal, otherwise |vertical|.
43 int PrimaryAxisValue(int horizontal, int vertical) const;
44
36 virtual ShelfAutoHideBehavior GetAutoHideBehavior() const = 0; 45 virtual ShelfAutoHideBehavior GetAutoHideBehavior() const = 0;
37 virtual void SetAutoHideBehavior(ShelfAutoHideBehavior behavior) = 0; 46 virtual void SetAutoHideBehavior(ShelfAutoHideBehavior behavior) = 0;
38 47
39 virtual ShelfAutoHideState GetAutoHideState() const = 0; 48 virtual ShelfAutoHideState GetAutoHideState() const = 0;
40 49
41 // Invoke when the auto-hide state may have changed (for example, when the 50 // Invoke when the auto-hide state may have changed (for example, when the
42 // system tray bubble opens it should force the shelf to be visible). 51 // system tray bubble opens it should force the shelf to be visible).
43 virtual void UpdateAutoHideState() = 0; 52 virtual void UpdateAutoHideState() = 0;
44 53
45 virtual ShelfBackgroundType GetBackgroundType() const = 0; 54 virtual ShelfBackgroundType GetBackgroundType() const = 0;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 virtual ShelfLockingManager* GetShelfLockingManagerForTesting() = 0; 104 virtual ShelfLockingManager* GetShelfLockingManagerForTesting() = 0;
96 virtual ShelfView* GetShelfViewForTesting() = 0; 105 virtual ShelfView* GetShelfViewForTesting() = 0;
97 106
98 protected: 107 protected:
99 virtual ~WmShelf() {} 108 virtual ~WmShelf() {}
100 }; 109 };
101 110
102 } // namespace ash 111 } // namespace ash
103 112
104 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ 113 #endif // ASH_COMMON_SHELF_WM_SHELF_H_
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_view.cc ('k') | ash/common/shelf/wm_shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698