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

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

Issue 231123002: Notify about major session changes events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 6 years, 8 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> 8 #include <vector>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/session_state_observer.h"
11 #include "ash/shelf/background_animator.h" 12 #include "ash/shelf/background_animator.h"
12 #include "ash/shelf/shelf.h" 13 #include "ash/shelf/shelf.h"
13 #include "ash/shelf/shelf_types.h" 14 #include "ash/shelf/shelf_types.h"
14 #include "ash/shell_observer.h" 15 #include "ash/shell_observer.h"
15 #include "ash/system/status_area_widget.h" 16 #include "ash/system/status_area_widget.h"
16 #include "ash/wm/dock/docked_window_layout_manager_observer.h" 17 #include "ash/wm/dock/docked_window_layout_manager_observer.h"
17 #include "ash/wm/lock_state_observer.h" 18 #include "ash/wm/lock_state_observer.h"
18 #include "ash/wm/workspace/workspace_types.h" 19 #include "ash/wm/workspace/workspace_types.h"
19 #include "base/basictypes.h" 20 #include "base/basictypes.h"
20 #include "base/compiler_specific.h" 21 #include "base/compiler_specific.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // width of the status area. This allows the shelf to draw the background and 54 // width of the status area. This allows the shelf to draw the background and
54 // layout to the status area. 55 // layout to the status area.
55 // To respond to bounds changes in the status area StatusAreaLayoutManager works 56 // To respond to bounds changes in the status area StatusAreaLayoutManager works
56 // closely with ShelfLayoutManager. 57 // closely with ShelfLayoutManager.
57 class ASH_EXPORT ShelfLayoutManager : 58 class ASH_EXPORT ShelfLayoutManager :
58 public aura::LayoutManager, 59 public aura::LayoutManager,
59 public ash::ShellObserver, 60 public ash::ShellObserver,
60 public aura::client::ActivationChangeObserver, 61 public aura::client::ActivationChangeObserver,
61 public DockedWindowLayoutManagerObserver, 62 public DockedWindowLayoutManagerObserver,
62 public keyboard::KeyboardControllerObserver, 63 public keyboard::KeyboardControllerObserver,
63 public LockStateObserver { 64 public LockStateObserver,
65 public SessionStateObserver {
64 public: 66 public:
65 67
66 // We reserve a small area on the edge of the workspace area to ensure that 68 // We reserve a small area on the edge of the workspace area to ensure that
67 // the resize handle at the edge of the window can be hit. 69 // the resize handle at the edge of the window can be hit.
68 static const int kWorkspaceAreaVisibleInset; 70 static const int kWorkspaceAreaVisibleInset;
69 71
70 // When autohidden we extend the touch hit target onto the screen so that the 72 // When autohidden we extend the touch hit target onto the screen so that the
71 // user can drag the shelf out. 73 // user can drag the shelf out.
72 static const int kWorkspaceAreaAutoHideInset; 74 static const int kWorkspaceAreaAutoHideInset;
73 75
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 virtual void OnMaximizeModeStarted() OVERRIDE; 186 virtual void OnMaximizeModeStarted() OVERRIDE;
185 virtual void OnMaximizeModeEnded() OVERRIDE; 187 virtual void OnMaximizeModeEnded() OVERRIDE;
186 188
187 // Overriden from aura::client::ActivationChangeObserver: 189 // Overriden from aura::client::ActivationChangeObserver:
188 virtual void OnWindowActivated(aura::Window* gained_active, 190 virtual void OnWindowActivated(aura::Window* gained_active,
189 aura::Window* lost_active) OVERRIDE; 191 aura::Window* lost_active) OVERRIDE;
190 192
191 // Overridden from ash::LockStateObserver: 193 // Overridden from ash::LockStateObserver:
192 virtual void OnLockStateEvent(LockStateObserver::EventType event) OVERRIDE; 194 virtual void OnLockStateEvent(LockStateObserver::EventType event) OVERRIDE;
193 195
196 // Overridden from ash::SessionStateChanged:
Daniel Erat 2014/04/11 14:43:41 s/SessionStateChanged/SessionStateObserver/
Nikita (slow) 2014/04/14 08:53:16 Done.
197 virtual void SessionStateChanged(
198 SessionStateDelegate::SessionState state) OVERRIDE;
199
194 // TODO(harrym|oshima): These templates will be moved to 200 // TODO(harrym|oshima): These templates will be moved to
195 // new Shelf class. 201 // new Shelf class.
196 // A helper function that provides a shortcut for choosing 202 // A helper function that provides a shortcut for choosing
197 // values specific to a shelf alignment. 203 // values specific to a shelf alignment.
198 template<typename T> 204 template<typename T>
199 T SelectValueForShelfAlignment(T bottom, T left, T right, T top) const { 205 T SelectValueForShelfAlignment(T bottom, T left, T right, T top) const {
200 switch (GetAlignment()) { 206 switch (GetAlignment()) {
201 case SHELF_ALIGNMENT_BOTTOM: 207 case SHELF_ALIGNMENT_BOTTOM:
202 return bottom; 208 return bottom;
203 case SHELF_ALIGNMENT_LEFT: 209 case SHELF_ALIGNMENT_LEFT:
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 415
410 // The show hide animation duration override or 0 for default. 416 // The show hide animation duration override or 0 for default.
411 int duration_override_in_ms_; 417 int duration_override_in_ms_;
412 418
413 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); 419 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
414 }; 420 };
415 421
416 } // namespace ash 422 } // namespace ash
417 423
418 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ 424 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698