| 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_DESKTOP_POPUP_ALIGNMENT_DELEGATE_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_DESKTOP_POPUP_ALIGNMENT_DELEGATE_H_ |
| 6 #define UI_MESSAGE_CENTER_VIEWS_DESKTOP_POPUP_ALIGNMENT_DELEGATE_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_DESKTOP_POPUP_ALIGNMENT_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 private: | 45 private: |
| 46 friend class test::MessagePopupCollectionTest; | 46 friend class test::MessagePopupCollectionTest; |
| 47 | 47 |
| 48 enum PopupAlignment { | 48 enum PopupAlignment { |
| 49 POPUP_ALIGNMENT_TOP = 1 << 0, | 49 POPUP_ALIGNMENT_TOP = 1 << 0, |
| 50 POPUP_ALIGNMENT_LEFT = 1 << 1, | 50 POPUP_ALIGNMENT_LEFT = 1 << 1, |
| 51 POPUP_ALIGNMENT_BOTTOM = 1 << 2, | 51 POPUP_ALIGNMENT_BOTTOM = 1 << 2, |
| 52 POPUP_ALIGNMENT_RIGHT = 1 << 3, | 52 POPUP_ALIGNMENT_RIGHT = 1 << 3, |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 void UpdatePrimaryDisplay(); |
| 56 |
| 55 // Overridden from display::DisplayObserver: | 57 // Overridden from display::DisplayObserver: |
| 56 void OnDisplayAdded(const display::Display& new_display) override; | 58 void OnDisplayAdded(const display::Display& new_display) override; |
| 57 void OnDisplayRemoved(const display::Display& old_display) override; | 59 void OnDisplayRemoved(const display::Display& old_display) override; |
| 58 void OnDisplayMetricsChanged(const display::Display& display, | 60 void OnDisplayMetricsChanged(const display::Display& display, |
| 59 uint32_t metrics) override; | 61 uint32_t metrics) override; |
| 60 | 62 |
| 61 int32_t alignment_; | 63 int32_t alignment_; |
| 62 int64_t display_id_; | 64 int64_t primary_display_id_; |
| 63 display::Screen* screen_; | 65 display::Screen* screen_; |
| 64 gfx::Rect work_area_; | 66 gfx::Rect work_area_; |
| 65 | 67 |
| 66 DISALLOW_COPY_AND_ASSIGN(DesktopPopupAlignmentDelegate); | 68 DISALLOW_COPY_AND_ASSIGN(DesktopPopupAlignmentDelegate); |
| 67 }; | 69 }; |
| 68 | 70 |
| 69 } // namespace message_center | 71 } // namespace message_center |
| 70 | 72 |
| 71 #endif // UI_MESSAGE_CENTER_VIEWS_DESKTOP_POPUP_ALIGNMENT_DELEGATE_H_ | 73 #endif // UI_MESSAGE_CENTER_VIEWS_DESKTOP_POPUP_ALIGNMENT_DELEGATE_H_ |
| OLD | NEW |