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

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

Issue 2072023003: mash: Break ash system tray dependencies on ash::ShelfWidget (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/aura/wm_shelf_aura.cc ('k') | ash/focus_cycler_unittest.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
11 namespace gfx { 11 namespace gfx {
12 class Rect; 12 class Rect;
13 } 13 }
14 14
15 namespace ui {
16 class GestureEvent;
17 class MouseEvent;
18 }
19
15 namespace ash { 20 namespace ash {
16 21
17 class WmShelfObserver; 22 class WmShelfObserver;
18 class WmWindow; 23 class WmWindow;
19 24
20 // Used for accessing global state. 25 // Used for accessing global state.
21 class ASH_EXPORT WmShelf { 26 class ASH_EXPORT WmShelf {
22 public: 27 public:
23 // Returns the window showing the shelf. 28 // Returns the window showing the shelf.
24 virtual WmWindow* GetWindow() = 0; 29 virtual WmWindow* GetWindow() = 0;
25 30
26 virtual ShelfAlignment GetAlignment() const = 0; 31 virtual ShelfAlignment GetAlignment() const = 0;
27 virtual void SetAlignment(ShelfAlignment alignment) = 0; 32 virtual void SetAlignment(ShelfAlignment alignment) = 0;
28 33
29 virtual ShelfAutoHideBehavior GetAutoHideBehavior() const = 0; 34 virtual ShelfAutoHideBehavior GetAutoHideBehavior() const = 0;
30 virtual void SetAutoHideBehavior(ShelfAutoHideBehavior behavior) = 0; 35 virtual void SetAutoHideBehavior(ShelfAutoHideBehavior behavior) = 0;
31 36
32 virtual ShelfAutoHideState GetAutoHideState() const = 0; 37 virtual ShelfAutoHideState GetAutoHideState() const = 0;
33 38
39 // Invoke when the auto-hide state may have changed (for example, when the
40 // system tray bubble opens it should force the shelf to be visible).
41 virtual void UpdateAutoHideState() = 0;
42
34 virtual ShelfBackgroundType GetBackgroundType() const = 0; 43 virtual ShelfBackgroundType GetBackgroundType() const = 0;
35 44
45 // Shelf items are slightly dimmed (e.g. when a window is maximized).
46 virtual bool IsDimmed() const = 0;
47
48 // Whether the shelf view is visible.
49 // TODO(jamescook): Consolidate this with GetVisibilityState().
50 virtual bool IsVisible() const = 0;
51
36 virtual void UpdateVisibilityState() = 0; 52 virtual void UpdateVisibilityState() = 0;
37 53
38 virtual ShelfVisibilityState GetVisibilityState() const = 0; 54 virtual ShelfVisibilityState GetVisibilityState() const = 0;
39 55
56 // Returns the ideal bounds of the shelf assuming it is visible.
57 virtual gfx::Rect GetIdealBounds() = 0;
58
40 virtual gfx::Rect GetUserWorkAreaBounds() const = 0; 59 virtual gfx::Rect GetUserWorkAreaBounds() const = 0;
41 60
42 virtual void UpdateIconPositionForWindow(WmWindow* window) = 0; 61 virtual void UpdateIconPositionForWindow(WmWindow* window) = 0;
43 62
44 // Returns the screen bounds of the item for the specified window. If there is 63 // Returns the screen bounds of the item for the specified window. If there is
45 // no item for the specified window an empty rect is returned. 64 // no item for the specified window an empty rect is returned.
46 virtual gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window) = 0; 65 virtual gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window) = 0;
47 66
67 // TODO(jamescook): Nuke when ash_sysui is removed. http://crbug.com/621112
68 virtual void UpdateAutoHideForMouseEvent(ui::MouseEvent* event) = 0;
69 virtual void UpdateAutoHideForGestureEvent(ui::GestureEvent* event) = 0;
70
48 virtual void AddObserver(WmShelfObserver* observer) = 0; 71 virtual void AddObserver(WmShelfObserver* observer) = 0;
49 virtual void RemoveObserver(WmShelfObserver* observer) = 0; 72 virtual void RemoveObserver(WmShelfObserver* observer) = 0;
50 73
51 protected: 74 protected:
52 virtual ~WmShelf() {} 75 virtual ~WmShelf() {}
53 }; 76 };
54 77
55 } // namespace ash 78 } // namespace ash
56 79
57 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ 80 #endif // ASH_COMMON_SHELF_WM_SHELF_H_
OLDNEW
« no previous file with comments | « ash/aura/wm_shelf_aura.cc ('k') | ash/focus_cycler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698