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

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

Issue 15931005: Move bezel event routing for the shelf into ShelfLayoutManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <vector>
9
8 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
9 #include "ash/launcher/launcher.h" 11 #include "ash/launcher/launcher.h"
10 #include "ash/shelf/background_animator.h" 12 #include "ash/shelf/background_animator.h"
11 #include "ash/shelf/shelf_types.h" 13 #include "ash/shelf/shelf_types.h"
12 #include "ash/shell_observer.h" 14 #include "ash/shell_observer.h"
13 #include "ash/system/status_area_widget.h" 15 #include "ash/system/status_area_widget.h"
14 #include "base/basictypes.h" 16 #include "base/basictypes.h"
15 #include "base/compiler_specific.h" 17 #include "base/compiler_specific.h"
16 #include "base/logging.h" 18 #include "base/logging.h"
17 #include "base/observer_list.h" 19 #include "base/observer_list.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // Tests if the browser is currently in fullscreen mode with minimal 189 // Tests if the browser is currently in fullscreen mode with minimal
188 // Chrome. When minimal Chrome is present the shelf should be displayed. 190 // Chrome. When minimal Chrome is present the shelf should be displayed.
189 bool FullscreenWithMinimalChrome() const; 191 bool FullscreenWithMinimalChrome() const;
190 192
191 // Returns a ShelfLayoutManager on the display which has a launcher for 193 // Returns a ShelfLayoutManager on the display which has a launcher for
192 // given |window|. See RootWindowController::ForLauncher for more info. 194 // given |window|. See RootWindowController::ForLauncher for more info.
193 static ShelfLayoutManager* ForLauncher(aura::Window* window); 195 static ShelfLayoutManager* ForLauncher(aura::Window* window);
194 196
195 private: 197 private:
196 class AutoHideEventFilter; 198 class AutoHideEventFilter;
199 class BezelEventFilter;
197 class UpdateShelfObserver; 200 class UpdateShelfObserver;
198 friend class ash::ScreenAsh; 201 friend class ash::ScreenAsh;
199 friend class PanelLayoutManagerTest; 202 friend class PanelLayoutManagerTest;
200 friend class ShelfLayoutManagerTest; 203 friend class ShelfLayoutManagerTest;
201 204
202 struct TargetBounds { 205 struct TargetBounds {
203 TargetBounds(); 206 TargetBounds();
204 ~TargetBounds(); 207 ~TargetBounds();
205 208
206 float opacity; 209 float opacity;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 308
306 WorkspaceController* workspace_controller_; 309 WorkspaceController* workspace_controller_;
307 310
308 // Do any windows overlap the shelf? This is maintained by WorkspaceManager. 311 // Do any windows overlap the shelf? This is maintained by WorkspaceManager.
309 bool window_overlaps_shelf_; 312 bool window_overlaps_shelf_;
310 313
311 base::OneShotTimer<ShelfLayoutManager> auto_hide_timer_; 314 base::OneShotTimer<ShelfLayoutManager> auto_hide_timer_;
312 315
313 // EventFilter used to detect when user moves the mouse over the launcher to 316 // EventFilter used to detect when user moves the mouse over the launcher to
314 // trigger showing the launcher. 317 // trigger showing the launcher.
315 scoped_ptr<AutoHideEventFilter> event_filter_; 318 scoped_ptr<AutoHideEventFilter> auto_hide_event_filter_;
319
320 // EventFilter used to detect when user issues a gesture on a bezel sensor.
321 scoped_ptr<BezelEventFilter> bezel_event_filter_;
316 322
317 ObserverList<ShelfLayoutManagerObserver> observers_; 323 ObserverList<ShelfLayoutManagerObserver> observers_;
318 324
319 // The shelf reacts to gesture-drags, and can be set to auto-hide for certain 325 // The shelf reacts to gesture-drags, and can be set to auto-hide for certain
320 // gestures. Some shelf behaviour (e.g. visibility state, background color 326 // gestures. Some shelf behaviour (e.g. visibility state, background color
321 // etc.) are affected by various stages of the drag. The enum keeps track of 327 // etc.) are affected by various stages of the drag. The enum keeps track of
322 // the present status of the gesture drag. 328 // the present status of the gesture drag.
323 enum GestureDragStatus { 329 enum GestureDragStatus {
324 GESTURE_DRAG_NONE, 330 GESTURE_DRAG_NONE,
325 GESTURE_DRAG_IN_PROGRESS, 331 GESTURE_DRAG_IN_PROGRESS,
(...skipping 14 matching lines...) Expand all
340 // The bounds of the keyboard. 346 // The bounds of the keyboard.
341 gfx::Rect keyboard_bounds_; 347 gfx::Rect keyboard_bounds_;
342 348
343 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); 349 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
344 }; 350 };
345 351
346 } // namespace internal 352 } // namespace internal
347 } // namespace ash 353 } // namespace ash
348 354
349 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ 355 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698