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

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

Issue 2834773002: Hide popup custom notifications on non-primary displays (Closed)
Patch Set: Rewrote comment Created 3 years, 7 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
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 23 matching lines...) Expand all
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 gfx::Rect GetWorkArea() 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 bool IsPrimaryDisplayForNotification() const override;
44 45
45 private: 46 private:
46 friend class test::MessagePopupCollectionTest; 47 friend class test::MessagePopupCollectionTest;
47 48
48 enum PopupAlignment { 49 enum PopupAlignment {
49 POPUP_ALIGNMENT_TOP = 1 << 0, 50 POPUP_ALIGNMENT_TOP = 1 << 0,
50 POPUP_ALIGNMENT_LEFT = 1 << 1, 51 POPUP_ALIGNMENT_LEFT = 1 << 1,
51 POPUP_ALIGNMENT_BOTTOM = 1 << 2, 52 POPUP_ALIGNMENT_BOTTOM = 1 << 2,
52 POPUP_ALIGNMENT_RIGHT = 1 << 3, 53 POPUP_ALIGNMENT_RIGHT = 1 << 3,
53 }; 54 };
(...skipping 10 matching lines...) Expand all
64 int64_t primary_display_id_; 65 int64_t primary_display_id_;
65 display::Screen* screen_; 66 display::Screen* screen_;
66 gfx::Rect work_area_; 67 gfx::Rect work_area_;
67 68
68 DISALLOW_COPY_AND_ASSIGN(DesktopPopupAlignmentDelegate); 69 DISALLOW_COPY_AND_ASSIGN(DesktopPopupAlignmentDelegate);
69 }; 70 };
70 71
71 } // namespace message_center 72 } // namespace message_center
72 73
73 #endif // UI_MESSAGE_CENTER_VIEWS_DESKTOP_POPUP_ALIGNMENT_DELEGATE_H_ 74 #endif // UI_MESSAGE_CENTER_VIEWS_DESKTOP_POPUP_ALIGNMENT_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698