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

Side by Side Diff: ui/message_center/views/desktop_popup_alignment_delegate.h

Issue 2078773003: Realign message center popups when displays are added or removed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Realign message center popups when displays are added or removed Created 4 years, 5 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 | « AUTHORS ('k') | ui/message_center/views/desktop_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 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
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_
OLDNEW
« no previous file with comments | « AUTHORS ('k') | ui/message_center/views/desktop_popup_alignment_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698