| 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 | 10 | 
| 10 namespace gfx { | 11 namespace gfx { | 
| 11 class Point; | 12 class Point; | 
| 12 class Rect; | 13 class Rect; | 
| 13 } | 14 } | 
| 14 | 15 | 
| 15 namespace display { | 16 namespace display { | 
| 16 class Display; | 17 class Display; | 
| 17 } | 18 } | 
| 18 | 19 | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 43 | 44 | 
| 44   // Returns true if the toasts are positioned at the left side of the desktop | 45   // Returns true if the toasts are positioned at the left side of the desktop | 
| 45   // so that their reveal animation should happen from left side. | 46   // so that their reveal animation should happen from left side. | 
| 46   virtual bool IsFromLeft() const = 0; | 47   virtual bool IsFromLeft() const = 0; | 
| 47 | 48 | 
| 48   // Called when a new toast appears or toasts are rearranged in the |display|. | 49   // Called when a new toast appears or toasts are rearranged in the |display|. | 
| 49   // The subclass may override this method to check the current desktop status | 50   // The subclass may override this method to check the current desktop status | 
| 50   // so that the toasts are arranged at the correct place. | 51   // so that the toasts are arranged at the correct place. | 
| 51   virtual void RecomputeAlignment(const display::Display& display) = 0; | 52   virtual void RecomputeAlignment(const display::Display& display) = 0; | 
| 52 | 53 | 
|  | 54   // Sets the parent container for popups. If it does not set a parent a | 
|  | 55   // default parent will be used (e.g. the native desktop on Windows). | 
|  | 56   virtual void ConfigureWidgetInitParamsForContainer( | 
|  | 57       views::Widget* widget, | 
|  | 58       views::Widget::InitParams* init_params) = 0; | 
|  | 59 | 
| 53  protected: | 60  protected: | 
| 54   virtual ~PopupAlignmentDelegate(); | 61   virtual ~PopupAlignmentDelegate(); | 
| 55 | 62 | 
| 56   void DoUpdateIfPossible(); | 63   void DoUpdateIfPossible(); | 
| 57 | 64 | 
| 58  private: | 65  private: | 
| 59   MessagePopupCollection* collection_; | 66   MessagePopupCollection* collection_; | 
| 60 }; | 67 }; | 
| 61 | 68 | 
| 62 }  // namespace message_center | 69 }  // namespace message_center | 
| 63 | 70 | 
| 64 #endif  // UI_MESSAGE_CENTER_VIEWS_POPUP_ALIGNMENT_DELEGATE_H_ | 71 #endif  // UI_MESSAGE_CENTER_VIEWS_POPUP_ALIGNMENT_DELEGATE_H_ | 
| OLD | NEW | 
|---|