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

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

Issue 2834773002: Hide popup custom notifications on non-primary displays (Closed)
Patch Set: Rewrote comment Created 3 years, 8 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
« no previous file with comments | « no previous file | ash/system/web_notification/ash_popup_alignment_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // Overridden from message_center::PopupAlignmentDelegate: 50 // Overridden from message_center::PopupAlignmentDelegate:
51 int GetToastOriginX(const gfx::Rect& toast_bounds) const override; 51 int GetToastOriginX(const gfx::Rect& toast_bounds) const override;
52 int GetBaseLine() const override; 52 int GetBaseLine() const override;
53 gfx::Rect GetWorkArea() const override; 53 gfx::Rect GetWorkArea() 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 void ConfigureWidgetInitParamsForContainer( 57 void ConfigureWidgetInitParamsForContainer(
58 views::Widget* widget, 58 views::Widget* widget,
59 views::Widget::InitParams* init_params) override; 59 views::Widget::InitParams* init_params) override;
60 bool IsPrimaryDisplayForNotification() const override;
60 61
61 private: 62 private:
62 friend class AshPopupAlignmentDelegateTest; 63 friend class AshPopupAlignmentDelegateTest;
63 friend class WebNotificationTrayTest; 64 friend class WebNotificationTrayTest;
64 65
65 // Get the current alignment of the shelf. 66 // Get the current alignment of the shelf.
66 ShelfAlignment GetAlignment() const; 67 ShelfAlignment GetAlignment() const;
67 68
68 // Utility function to get the display which should be care about. 69 // Utility function to get the display which should be care about.
69 display::Display GetCurrentDisplay() const; 70 display::Display GetCurrentDisplay() const;
(...skipping 15 matching lines...) Expand all
85 gfx::Rect work_area_; 86 gfx::Rect work_area_;
86 WmShelf* shelf_; 87 WmShelf* shelf_;
87 int tray_bubble_height_; 88 int tray_bubble_height_;
88 89
89 DISALLOW_COPY_AND_ASSIGN(AshPopupAlignmentDelegate); 90 DISALLOW_COPY_AND_ASSIGN(AshPopupAlignmentDelegate);
90 }; 91 };
91 92
92 } // namespace ash 93 } // namespace ash
93 94
94 #endif // ASH_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_ 95 #endif // ASH_SYSTEM_WEB_NOTIFICATION_ASH_POPUP_ALIGNMENT_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | ash/system/web_notification/ash_popup_alignment_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698