| 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" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 explicit AshPopupAlignmentDelegate(ShelfLayoutManager* shelf); | 41 explicit AshPopupAlignmentDelegate(ShelfLayoutManager* shelf); |
| 42 ~AshPopupAlignmentDelegate() override; | 42 ~AshPopupAlignmentDelegate() override; |
| 43 | 43 |
| 44 // Start observing the system. | 44 // Start observing the system. |
| 45 void StartObserving(display::Screen* screen, const display::Display& display); | 45 void StartObserving(display::Screen* screen, const display::Display& display); |
| 46 | 46 |
| 47 // Sets the current height of the system tray so that the notification toasts | 47 // Sets the current height of the system tray so that the notification toasts |
| 48 // can avoid it. | 48 // can avoid it. |
| 49 void SetSystemTrayHeight(int height); | 49 void SetSystemTrayHeight(int height); |
| 50 | 50 |
| 51 // Returns the current system tray height. |
| 52 int system_tray_height_for_test() const { return system_tray_height_; } |
| 53 |
| 51 // Overridden from message_center::PopupAlignmentDelegate: | 54 // Overridden from message_center::PopupAlignmentDelegate: |
| 52 int GetToastOriginX(const gfx::Rect& toast_bounds) const override; | 55 int GetToastOriginX(const gfx::Rect& toast_bounds) const override; |
| 53 int GetBaseLine() const override; | 56 int GetBaseLine() const override; |
| 54 int GetWorkAreaBottom() const override; | 57 int GetWorkAreaBottom() const override; |
| 55 bool IsTopDown() const override; | 58 bool IsTopDown() const override; |
| 56 bool IsFromLeft() const override; | 59 bool IsFromLeft() const override; |
| 57 void RecomputeAlignment(const display::Display& display) override; | 60 void RecomputeAlignment(const display::Display& display) override; |
| 58 | 61 |
| 59 private: | 62 private: |
| 60 friend class AshPopupAlignmentDelegateTest; | 63 friend class AshPopupAlignmentDelegateTest; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 86 gfx::Rect work_area_; | 89 gfx::Rect work_area_; |
| 87 ShelfLayoutManager* shelf_; | 90 ShelfLayoutManager* shelf_; |
| 88 int system_tray_height_; | 91 int system_tray_height_; |
| 89 | 92 |
| 90 DISALLOW_COPY_AND_ASSIGN(AshPopupAlignmentDelegate); | 93 DISALLOW_COPY_AND_ASSIGN(AshPopupAlignmentDelegate); |
| 91 }; | 94 }; |
| 92 | 95 |
| 93 } // namespace ash | 96 } // namespace ash |
| 94 | 97 |
| 95 #endif // ASH_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ | 98 #endif // ASH_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ |
| OLD | NEW |