| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_COMMON_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ | 5 #ifndef ASH_COMMON_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ |
| 6 #define ASH_COMMON_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ | 6 #define ASH_COMMON_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 // Get the current alignment of the shelf. | 66 // Get the current alignment of the shelf. |
| 67 ShelfAlignment GetAlignment() const; | 67 ShelfAlignment GetAlignment() const; |
| 68 | 68 |
| 69 // Utility function to get the display which should be care about. | 69 // Utility function to get the display which should be care about. |
| 70 display::Display GetCurrentDisplay() const; | 70 display::Display GetCurrentDisplay() const; |
| 71 | 71 |
| 72 // Compute the new work area. | 72 // Compute the new work area. |
| 73 void UpdateWorkArea(); | 73 void UpdateWorkArea(); |
| 74 | 74 |
| 75 // Overridden from ShellObserver: | |
| 76 void OnDisplayWorkAreaInsetsChanged() override; | |
| 77 | |
| 78 // WmShelfObserver: | 75 // WmShelfObserver: |
| 79 void WillChangeVisibilityState(ShelfVisibilityState new_state) override; | 76 void WillChangeVisibilityState(ShelfVisibilityState new_state) override; |
| 80 void OnAutoHideStateChanged(ShelfAutoHideState new_state) override; | 77 void OnAutoHideStateChanged(ShelfAutoHideState new_state) override; |
| 81 | 78 |
| 82 // Overridden from display::DisplayObserver: | 79 // Overridden from display::DisplayObserver: |
| 83 void OnDisplayAdded(const display::Display& new_display) override; | 80 void OnDisplayAdded(const display::Display& new_display) override; |
| 84 void OnDisplayRemoved(const display::Display& old_display) override; | 81 void OnDisplayRemoved(const display::Display& old_display) override; |
| 85 void OnDisplayMetricsChanged(const display::Display& display, | 82 void OnDisplayMetricsChanged(const display::Display& display, |
| 86 uint32_t metrics) override; | 83 uint32_t metrics) override; |
| 87 | 84 |
| 88 display::Screen* screen_; | 85 display::Screen* screen_; |
| 89 gfx::Rect work_area_; | 86 gfx::Rect work_area_; |
| 90 WmShelf* shelf_; | 87 WmShelf* shelf_; |
| 91 int tray_bubble_height_; | 88 int tray_bubble_height_; |
| 92 | 89 |
| 93 DISALLOW_COPY_AND_ASSIGN(AshPopupAlignmentDelegate); | 90 DISALLOW_COPY_AND_ASSIGN(AshPopupAlignmentDelegate); |
| 94 }; | 91 }; |
| 95 | 92 |
| 96 } // namespace ash | 93 } // namespace ash |
| 97 | 94 |
| 98 #endif // ASH_COMMON_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ | 95 #endif // ASH_COMMON_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ |
| OLD | NEW |