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

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

Issue 2472233002: Fix a bug of PopupAlignmentDelegate on non-primary display (Closed)
Patch Set: Addressed comment: returning a rect instead of top Created 4 years, 1 month 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
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 16 matching lines...) Expand all
27 public display::DisplayObserver { 27 public display::DisplayObserver {
28 public: 28 public:
29 DesktopPopupAlignmentDelegate(); 29 DesktopPopupAlignmentDelegate();
30 ~DesktopPopupAlignmentDelegate() override; 30 ~DesktopPopupAlignmentDelegate() override;
31 31
32 void StartObserving(display::Screen* screen); 32 void StartObserving(display::Screen* screen);
33 33
34 // Overridden from PopupAlignmentDelegate: 34 // Overridden from PopupAlignmentDelegate:
35 int GetToastOriginX(const gfx::Rect& toast_bounds) const override; 35 int GetToastOriginX(const gfx::Rect& toast_bounds) const override;
36 int GetBaseLine() const override; 36 int GetBaseLine() const override;
37 int GetWorkAreaBottom() const override; 37 gfx::Rect GetWorkArea() const override;
38 bool IsTopDown() const override; 38 bool IsTopDown() const override;
39 bool IsFromLeft() const override; 39 bool IsFromLeft() const override;
40 void RecomputeAlignment(const display::Display& display) override; 40 void RecomputeAlignment(const display::Display& display) override;
41 void ConfigureWidgetInitParamsForContainer( 41 void ConfigureWidgetInitParamsForContainer(
42 views::Widget* widget, 42 views::Widget* widget,
43 views::Widget::InitParams* init_params) override; 43 views::Widget::InitParams* init_params) override;
44 44
45 private: 45 private:
46 friend class test::MessagePopupCollectionTest; 46 friend class test::MessagePopupCollectionTest;
47 47
(...skipping 16 matching lines...) Expand all
64 int64_t primary_display_id_; 64 int64_t primary_display_id_;
65 display::Screen* screen_; 65 display::Screen* screen_;
66 gfx::Rect work_area_; 66 gfx::Rect work_area_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(DesktopPopupAlignmentDelegate); 68 DISALLOW_COPY_AND_ASSIGN(DesktopPopupAlignmentDelegate);
69 }; 69 };
70 70
71 } // namespace message_center 71 } // namespace message_center
72 72
73 #endif // UI_MESSAGE_CENTER_VIEWS_DESKTOP_POPUP_ALIGNMENT_DELEGATE_H_ 73 #endif // UI_MESSAGE_CENTER_VIEWS_DESKTOP_POPUP_ALIGNMENT_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698