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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 #include "ash/common/shelf/shelf_types.h" |
11 #include "ash/shelf/shelf_layout_manager_observer.h" | 12 #include "ash/shelf/shelf_layout_manager_observer.h" |
12 #include "ash/shelf/shelf_types.h" | |
13 #include "ash/shell_observer.h" | 13 #include "ash/shell_observer.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "ui/display/display_observer.h" | 15 #include "ui/display/display_observer.h" |
16 #include "ui/gfx/geometry/rect.h" | 16 #include "ui/gfx/geometry/rect.h" |
17 #include "ui/message_center/views/popup_alignment_delegate.h" | 17 #include "ui/message_center/views/popup_alignment_delegate.h" |
18 | 18 |
19 namespace display { | 19 namespace display { |
20 class Screen; | 20 class Screen; |
21 } | 21 } |
22 | 22 |
(...skipping 30 matching lines...) Expand all Loading... |
53 int GetWorkAreaBottom() const override; | 53 int GetWorkAreaBottom() const override; |
54 bool IsTopDown() const override; | 54 bool IsTopDown() const override; |
55 bool IsFromLeft() const override; | 55 bool IsFromLeft() const override; |
56 void RecomputeAlignment(const display::Display& display) override; | 56 void RecomputeAlignment(const display::Display& display) override; |
57 | 57 |
58 private: | 58 private: |
59 friend class AshPopupAlignmentDelegateTest; | 59 friend class AshPopupAlignmentDelegateTest; |
60 friend class WebNotificationTrayTest; | 60 friend class WebNotificationTrayTest; |
61 | 61 |
62 // Get the current alignment of the shelf. | 62 // Get the current alignment of the shelf. |
63 wm::ShelfAlignment GetAlignment() const; | 63 ShelfAlignment GetAlignment() const; |
64 | 64 |
65 // Utility function to get the display which should be care about. | 65 // Utility function to get the display which should be care about. |
66 display::Display GetCurrentDisplay() const; | 66 display::Display GetCurrentDisplay() const; |
67 | 67 |
68 // Compute the new work area. | 68 // Compute the new work area. |
69 void UpdateWorkArea(); | 69 void UpdateWorkArea(); |
70 | 70 |
71 // Overridden from ShellObserver: | 71 // Overridden from ShellObserver: |
72 void OnDisplayWorkAreaInsetsChanged() override; | 72 void OnDisplayWorkAreaInsetsChanged() override; |
73 | 73 |
(...skipping 11 matching lines...) Expand all Loading... |
85 gfx::Rect work_area_; | 85 gfx::Rect work_area_; |
86 ShelfLayoutManager* shelf_; | 86 ShelfLayoutManager* shelf_; |
87 int system_tray_height_; | 87 int system_tray_height_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(AshPopupAlignmentDelegate); | 89 DISALLOW_COPY_AND_ASSIGN(AshPopupAlignmentDelegate); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace ash | 92 } // namespace ash |
93 | 93 |
94 #endif // ASH_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ | 94 #endif // ASH_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ |
OLD | NEW |