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