| 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 UI_MESSAGE_CENTER_VIEWS_POPUP_ALIGNMENT_DELEGATE_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_POPUP_ALIGNMENT_DELEGATE_H_ |
| 6 #define UI_MESSAGE_CENTER_VIEWS_POPUP_ALIGNMENT_DELEGATE_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_POPUP_ALIGNMENT_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ui/message_center/message_center_export.h" | 8 #include "ui/message_center/message_center_export.h" |
| 9 #include "ui/views/widget/widget.h" | 9 #include "ui/views/widget/widget.h" |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // The subclass may override this method to check the current desktop status | 49 // The subclass may override this method to check the current desktop status |
| 50 // so that the toasts are arranged at the correct place. | 50 // so that the toasts are arranged at the correct place. |
| 51 virtual void RecomputeAlignment(const display::Display& display) = 0; | 51 virtual void RecomputeAlignment(const display::Display& display) = 0; |
| 52 | 52 |
| 53 // Sets the parent container for popups. If it does not set a parent a | 53 // Sets the parent container for popups. If it does not set a parent a |
| 54 // default parent will be used (e.g. the native desktop on Windows). | 54 // default parent will be used (e.g. the native desktop on Windows). |
| 55 virtual void ConfigureWidgetInitParamsForContainer( | 55 virtual void ConfigureWidgetInitParamsForContainer( |
| 56 views::Widget* widget, | 56 views::Widget* widget, |
| 57 views::Widget::InitParams* init_params) = 0; | 57 views::Widget::InitParams* init_params) = 0; |
| 58 | 58 |
| 59 // Returns true if the display which notifications show on is the primary |
| 60 // display. |
| 61 virtual bool IsPrimaryDisplayForNotification() const = 0; |
| 62 |
| 59 protected: | 63 protected: |
| 60 virtual ~PopupAlignmentDelegate(); | 64 virtual ~PopupAlignmentDelegate(); |
| 61 | 65 |
| 62 void DoUpdateIfPossible(); | 66 void DoUpdateIfPossible(); |
| 63 | 67 |
| 64 private: | 68 private: |
| 65 MessagePopupCollection* collection_; | 69 MessagePopupCollection* collection_; |
| 66 }; | 70 }; |
| 67 | 71 |
| 68 } // namespace message_center | 72 } // namespace message_center |
| 69 | 73 |
| 70 #endif // UI_MESSAGE_CENTER_VIEWS_POPUP_ALIGNMENT_DELEGATE_H_ | 74 #endif // UI_MESSAGE_CENTER_VIEWS_POPUP_ALIGNMENT_DELEGATE_H_ |
| OLD | NEW |