OLD | NEW |
---|---|
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_SHELF_WM_SHELF_H_ | 5 #ifndef ASH_SHELF_WM_SHELF_H_ |
6 #define ASH_SHELF_WM_SHELF_H_ | 6 #define ASH_SHELF_WM_SHELF_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 | 116 |
117 // Returns the screen bounds of the item for the specified window. If there is | 117 // Returns the screen bounds of the item for the specified window. If there is |
118 // no item for the specified window an empty rect is returned. | 118 // no item for the specified window an empty rect is returned. |
119 gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window); | 119 gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window); |
120 | 120 |
121 // Launch a 0-indexed shelf item in the shelf. A negative index launches the | 121 // Launch a 0-indexed shelf item in the shelf. A negative index launches the |
122 // last shelf item in the shelf. | 122 // last shelf item in the shelf. |
123 static void LaunchShelfItem(int item_index); | 123 static void LaunchShelfItem(int item_index); |
124 | 124 |
125 // Activates the shelf item specified by the index in the list of shelf items. | 125 // Activates the shelf item specified by the index in the list of shelf items. |
126 static void ActivateShelfItem(int item_index); | 126 static void ActivateShelfItem(int item_index); |
stevenjb
2017/05/22 17:55:28
Is this still called? Maybe note where/why we do n
weidongg
2017/05/23 16:37:46
There are 40 occurrences of this function, so shou
| |
127 | 127 |
128 // Activates the shelf item specified by the index in the list of shelf items | |
129 // in the display identified by |display_id|. | |
Mr4D (OOO till 08-26)
2017/05/22 15:02:28
on the display ...?
weidongg
2017/05/23 16:37:46
Done.
| |
130 static void ActivateShelfItemInDisplay(int item_index, int64_t display_id); | |
131 | |
128 // Handles a gesture |event| coming from a source outside the shelf widget | 132 // Handles a gesture |event| coming from a source outside the shelf widget |
129 // (e.g. the status area widget). Allows support for behaviors like toggling | 133 // (e.g. the status area widget). Allows support for behaviors like toggling |
130 // auto-hide with a swipe, even if that gesture event hits another window. | 134 // auto-hide with a swipe, even if that gesture event hits another window. |
131 // Returns true if the event was handled. | 135 // Returns true if the event was handled. |
132 bool ProcessGestureEvent(const ui::GestureEvent& event); | 136 bool ProcessGestureEvent(const ui::GestureEvent& event); |
133 | 137 |
134 void AddObserver(WmShelfObserver* observer); | 138 void AddObserver(WmShelfObserver* observer); |
135 void RemoveObserver(WmShelfObserver* observer); | 139 void RemoveObserver(WmShelfObserver* observer); |
136 | 140 |
137 void NotifyShelfIconPositionsChanged(); | 141 void NotifyShelfIconPositionsChanged(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
179 // Forwards touch gestures on a bezel sensor to the shelf. | 183 // Forwards touch gestures on a bezel sensor to the shelf. |
180 // TODO(mash): Facilitate simliar functionality in mash: crbug.com/636647 | 184 // TODO(mash): Facilitate simliar functionality in mash: crbug.com/636647 |
181 std::unique_ptr<ShelfBezelEventHandler> bezel_event_handler_; | 185 std::unique_ptr<ShelfBezelEventHandler> bezel_event_handler_; |
182 | 186 |
183 DISALLOW_COPY_AND_ASSIGN(WmShelf); | 187 DISALLOW_COPY_AND_ASSIGN(WmShelf); |
184 }; | 188 }; |
185 | 189 |
186 } // namespace ash | 190 } // namespace ash |
187 | 191 |
188 #endif // ASH_SHELF_WM_SHELF_H_ | 192 #endif // ASH_SHELF_WM_SHELF_H_ |
OLD | NEW |