Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: ash/system/web_notification/ash_popup_alignment_delegate.h

Issue 2008993004: Add a test of updating cached height for popup notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_unittest.cc ('k') | ash/system/web_notification/web_notification_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698