| OLD | NEW | 
|    1 // Copyright 2012 The Chromium Authors. All rights reserved. |    1 // Copyright 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 <memory> |    8 #include <memory> | 
|    9  |    9  | 
|   10 #include "ash/ash_export.h" |   10 #include "ash/ash_export.h" | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   57       public wm::WmSnapToPixelLayoutManager, |   57       public wm::WmSnapToPixelLayoutManager, | 
|   58       public SessionObserver { |   58       public SessionObserver { | 
|   59  public: |   59  public: | 
|   60   ShelfLayoutManager(ShelfWidget* shelf_widget, Shelf* shelf); |   60   ShelfLayoutManager(ShelfWidget* shelf_widget, Shelf* shelf); | 
|   61   ~ShelfLayoutManager() override; |   61   ~ShelfLayoutManager() override; | 
|   62  |   62  | 
|   63   bool updating_bounds() const { return updating_bounds_; } |   63   bool updating_bounds() const { return updating_bounds_; } | 
|   64  |   64  | 
|   65   // Clears internal data for shutdown process. |   65   // Clears internal data for shutdown process. | 
|   66   void PrepareForShutdown(); |   66   void PrepareForShutdown(); | 
 |   67  | 
|   67   // Returns whether the shelf and its contents (shelf, status) are visible |   68   // Returns whether the shelf and its contents (shelf, status) are visible | 
|   68   // on the screen. |   69   // on the screen. | 
|   69   bool IsVisible() const; |   70   bool IsVisible() const; | 
|   70  |   71  | 
|   71   // Returns the ideal bounds of the shelf assuming it is visible. |   72   // Returns the ideal bounds of the shelf assuming it is visible. | 
|   72   gfx::Rect GetIdealBounds(); |   73   gfx::Rect GetIdealBounds(); | 
|   73  |   74  | 
|   74   // Returns the preferred size of the shelf for the target visibility state. |   75   // Returns the preferred size of the shelf for the target visibility state. | 
|   75   gfx::Size GetPreferredSize(); |   76   gfx::Size GetPreferredSize(); | 
|   76  |   77  | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  130   // Overridden from wm::WmSnapToPixelLayoutManager: |  131   // Overridden from wm::WmSnapToPixelLayoutManager: | 
|  131   void OnWindowResized() override; |  132   void OnWindowResized() override; | 
|  132   void SetChildBounds(aura::Window* child, |  133   void SetChildBounds(aura::Window* child, | 
|  133                       const gfx::Rect& requested_bounds) override; |  134                       const gfx::Rect& requested_bounds) override; | 
|  134  |  135  | 
|  135   // Overridden from ShellObserver: |  136   // Overridden from ShellObserver: | 
|  136   void OnShelfAutoHideBehaviorChanged(aura::Window* root_window) override; |  137   void OnShelfAutoHideBehaviorChanged(aura::Window* root_window) override; | 
|  137   void OnPinnedStateChanged(aura::Window* pinned_window) override; |  138   void OnPinnedStateChanged(aura::Window* pinned_window) override; | 
|  138   void OnVirtualKeyboardStateChanged(bool activated, |  139   void OnVirtualKeyboardStateChanged(bool activated, | 
|  139                                      aura::Window* root_window) override; |  140                                      aura::Window* root_window) override; | 
|  140   void OnAppListVisibilityChanged(bool shown, |  | 
|  141                                   aura::Window* root_window) override; |  | 
|  142  |  141  | 
|  143   // Overridden from wm::ActivationChangeObserver: |  142   // Overridden from wm::ActivationChangeObserver: | 
|  144   void OnWindowActivated(ActivationReason reason, |  143   void OnWindowActivated(ActivationReason reason, | 
|  145                          aura::Window* gained_active, |  144                          aura::Window* gained_active, | 
|  146                          aura::Window* lost_active) override; |  145                          aura::Window* lost_active) override; | 
|  147  |  146  | 
|  148   // Overridden from keyboard::KeyboardControllerObserver: |  147   // Overridden from keyboard::KeyboardControllerObserver: | 
|  149   void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; |  148   void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; | 
|  150   void OnKeyboardClosed() override; |  149   void OnKeyboardClosed() override; | 
|  151  |  150  | 
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  311  |  310  | 
|  312   // Current state. |  311   // Current state. | 
|  313   State state_; |  312   State state_; | 
|  314  |  313  | 
|  315   ShelfWidget* shelf_widget_; |  314   ShelfWidget* shelf_widget_; | 
|  316   Shelf* shelf_; |  315   Shelf* shelf_; | 
|  317  |  316  | 
|  318   // Do any windows overlap the shelf? This is maintained by WorkspaceManager. |  317   // Do any windows overlap the shelf? This is maintained by WorkspaceManager. | 
|  319   bool window_overlaps_shelf_; |  318   bool window_overlaps_shelf_; | 
|  320  |  319  | 
|  321   // Is the AppList visible? This is maintained by |  | 
|  322   // OnAppListVisibilityChanged. |  | 
|  323   bool is_app_list_visible_ = false; |  | 
|  324  |  | 
|  325   base::OneShotTimer auto_hide_timer_; |  320   base::OneShotTimer auto_hide_timer_; | 
|  326  |  321  | 
|  327   // Whether the mouse was over the shelf when the auto hide timer started. |  322   // Whether the mouse was over the shelf when the auto hide timer started. | 
|  328   // False when neither the auto hide timer nor the timer task are running. |  323   // False when neither the auto hide timer nor the timer task are running. | 
|  329   bool mouse_over_shelf_when_auto_hide_timer_started_; |  324   bool mouse_over_shelf_when_auto_hide_timer_started_; | 
|  330  |  325  | 
|  331   base::ObserverList<ShelfLayoutManagerObserver> observers_; |  326   base::ObserverList<ShelfLayoutManagerObserver> observers_; | 
|  332  |  327  | 
|  333   // The shelf reacts to gesture-drags, and can be set to auto-hide for certain |  328   // The shelf reacts to gesture-drags, and can be set to auto-hide for certain | 
|  334   // gestures. Some shelf behaviour (e.g. visibility state, background color |  329   // gestures. Some shelf behaviour (e.g. visibility state, background color | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  374                  keyboard::KeyboardControllerObserver> |  369                  keyboard::KeyboardControllerObserver> | 
|  375       keyboard_observer_; |  370       keyboard_observer_; | 
|  376   ScopedSessionObserver scoped_session_observer_; |  371   ScopedSessionObserver scoped_session_observer_; | 
|  377  |  372  | 
|  378   DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); |  373   DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 
|  379 }; |  374 }; | 
|  380  |  375  | 
|  381 }  // namespace ash |  376 }  // namespace ash | 
|  382  |  377  | 
|  383 #endif  // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ |  378 #endif  // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ | 
| OLD | NEW |