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

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

Issue 2894743002: Make launching apps from shelf more intuitive (Closed)
Patch Set: Affected by new revision, gclient sync and re-upload. Created 3 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 | « no previous file | ash/shelf/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_SHELF_SHELF_H_ 5 #ifndef ASH_SHELF_SHELF_H_
6 #define ASH_SHELF_SHELF_H_ 6 #define ASH_SHELF_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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // no item for the specified window an empty rect is returned. 111 // no item for the specified window an empty rect is returned.
112 gfx::Rect GetScreenBoundsOfItemIconForWindow(aura::Window* window); 112 gfx::Rect GetScreenBoundsOfItemIconForWindow(aura::Window* window);
113 113
114 // Launch a 0-indexed shelf item in the shelf. A negative index launches the 114 // Launch a 0-indexed shelf item in the shelf. A negative index launches the
115 // last shelf item in the shelf. 115 // last shelf item in the shelf.
116 static void LaunchShelfItem(int item_index); 116 static void LaunchShelfItem(int item_index);
117 117
118 // Activates the shelf item specified by the index in the list of shelf items. 118 // Activates the shelf item specified by the index in the list of shelf items.
119 static void ActivateShelfItem(int item_index); 119 static void ActivateShelfItem(int item_index);
120 120
121 // Activates the shelf item specified by the index in the list of shelf items
122 // on the display identified by |display_id|.
123 static void ActivateShelfItemOnDisplay(int item_index, int64_t display_id);
124
121 // Handles a gesture |event| coming from a source outside the shelf widget 125 // Handles a gesture |event| coming from a source outside the shelf widget
122 // (e.g. the status area widget). Allows support for behaviors like toggling 126 // (e.g. the status area widget). Allows support for behaviors like toggling
123 // auto-hide with a swipe, even if that gesture event hits another window. 127 // auto-hide with a swipe, even if that gesture event hits another window.
124 // Returns true if the event was handled. 128 // Returns true if the event was handled.
125 bool ProcessGestureEvent(const ui::GestureEvent& event); 129 bool ProcessGestureEvent(const ui::GestureEvent& event);
126 130
127 void AddObserver(ShelfObserver* observer); 131 void AddObserver(ShelfObserver* observer);
128 void RemoveObserver(ShelfObserver* observer); 132 void RemoveObserver(ShelfObserver* observer);
129 133
130 void NotifyShelfIconPositionsChanged(); 134 void NotifyShelfIconPositionsChanged();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // Forwards touch gestures on a bezel sensor to the shelf. 172 // Forwards touch gestures on a bezel sensor to the shelf.
169 // TODO(mash): Facilitate simliar functionality in mash: crbug.com/636647 173 // TODO(mash): Facilitate simliar functionality in mash: crbug.com/636647
170 std::unique_ptr<ShelfBezelEventHandler> bezel_event_handler_; 174 std::unique_ptr<ShelfBezelEventHandler> bezel_event_handler_;
171 175
172 DISALLOW_COPY_AND_ASSIGN(Shelf); 176 DISALLOW_COPY_AND_ASSIGN(Shelf);
173 }; 177 };
174 178
175 } // namespace ash 179 } // namespace ash
176 180
177 #endif // ASH_SHELF_SHELF_H_ 181 #endif // ASH_SHELF_SHELF_H_
OLDNEW
« no previous file with comments | « no previous file | ash/shelf/shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698