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_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ | 5 #ifndef ASH_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ |
6 #define ASH_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ | 6 #define ASH_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/shelf/shelf_layout_manager_observer.h" | 9 #include "ash/shelf/shelf_layout_manager_observer.h" |
10 #include "ash/shelf/shelf_types.h" | 10 #include "ash/shelf/shelf_types.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 // Update |shelf_| and start watching when it's first set. This should not | 64 // Update |shelf_| and start watching when it's first set. This should not |
65 // be done in the constructor because the shelf might not be initialized at | 65 // be done in the constructor because the shelf might not be initialized at |
66 // that point. | 66 // that point. |
67 void UpdateShelf(); | 67 void UpdateShelf(); |
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 gfx::Display GetCurrentDisplay() const; | 70 gfx::Display GetCurrentDisplay() const; |
71 | 71 |
72 // Compute the new work area. | 72 // Compute the new work area. |
73 void UpdateWorkArea(); | 73 void UpdateWorkArea(const gfx::Display& display, |
| 74 ShelfAutoHideState new_state); |
74 | 75 |
75 // Overridden from ShellObserver: | 76 // Overridden from ShellObserver: |
76 void OnDisplayWorkAreaInsetsChanged() override; | 77 void OnDisplayWorkAreaInsetsChanged() override; |
77 | 78 |
78 // Overridden from ShelfLayoutManagerObserver: | 79 // Overridden from ShelfLayoutManagerObserver: |
79 void OnAutoHideStateChanged(ShelfAutoHideState new_state) override; | 80 void OnAutoHideStateChanged(ShelfAutoHideState new_state) override; |
80 | 81 |
81 // Overridden from gfx::DisplayObserver: | 82 // Overridden from gfx::DisplayObserver: |
82 void OnDisplayAdded(const gfx::Display& new_display) override; | 83 void OnDisplayAdded(const gfx::Display& new_display) override; |
83 void OnDisplayRemoved(const gfx::Display& old_display) override; | 84 void OnDisplayRemoved(const gfx::Display& old_display) override; |
84 void OnDisplayMetricsChanged(const gfx::Display& display, | 85 void OnDisplayMetricsChanged(const gfx::Display& display, |
85 uint32_t metrics) override; | 86 uint32_t metrics) override; |
86 | 87 |
87 gfx::Screen* screen_; | 88 gfx::Screen* screen_; |
88 gfx::Rect work_area_; | 89 gfx::Rect work_area_; |
89 aura::Window* root_window_; | 90 aura::Window* root_window_; |
90 ShelfLayoutManager* shelf_; | 91 ShelfLayoutManager* shelf_; |
91 int system_tray_height_; | 92 int system_tray_height_; |
92 | 93 |
93 DISALLOW_COPY_AND_ASSIGN(AshPopupAlignmentDelegate); | 94 DISALLOW_COPY_AND_ASSIGN(AshPopupAlignmentDelegate); |
94 }; | 95 }; |
95 | 96 |
96 } // namespace ash | 97 } // namespace ash |
97 | 98 |
98 #endif // ASH_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ | 99 #endif // ASH_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ |
OLD | NEW |