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

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

Issue 2729533002: Adjust behavior of control buttons of notifications. (Closed)
Patch Set: Add unimplemented method to TestContentViewDelegate Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CUSTOM_NOTIFICATION_VIEW_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_
6 #define UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/message_center/message_center_export.h" 9 #include "ui/message_center/message_center_export.h"
10 #include "ui/message_center/views/message_view.h" 10 #include "ui/message_center/views/message_view.h"
(...skipping 15 matching lines...) Expand all
26 // These method are called by the content view when focus handling is defered 26 // These method are called by the content view when focus handling is defered
27 // to the content. 27 // to the content.
28 void OnContentFocused(); 28 void OnContentFocused();
29 void OnContentBlured(); 29 void OnContentBlured();
30 30
31 // Overidden from MessageView: 31 // Overidden from MessageView:
32 void SetDrawBackgroundAsActive(bool active) override; 32 void SetDrawBackgroundAsActive(bool active) override;
33 bool IsCloseButtonFocused() const override; 33 bool IsCloseButtonFocused() const override;
34 void RequestFocusOnCloseButton() override; 34 void RequestFocusOnCloseButton() override;
35 bool IsPinned() const override; 35 bool IsPinned() const override;
36 void UpdateControlButtonsVisibility() override;
36 37
37 // Overridden from views::View: 38 // Overridden from views::View:
38 gfx::Size GetPreferredSize() const override; 39 gfx::Size GetPreferredSize() const override;
39 void Layout() override; 40 void Layout() override;
40 bool HasFocus() const override; 41 bool HasFocus() const override;
41 void RequestFocus() override; 42 void RequestFocus() override;
42 void OnPaint(gfx::Canvas* canvas) override; 43 void OnPaint(gfx::Canvas* canvas) override;
43 bool OnKeyPressed(const ui::KeyEvent& event) override; 44 bool OnKeyPressed(const ui::KeyEvent& event) override;
44 void ChildPreferredSizeChanged(View* child) override; 45 void ChildPreferredSizeChanged(View* child) override;
45 46
46 private: 47 private:
47 friend class CustomNotificationViewTest; 48 friend class CustomNotificationViewTest;
48 49
49 // The view for the custom content. Owned by view hierarchy. 50 // The view for the custom content. Owned by view hierarchy.
50 views::View* contents_view_ = nullptr; 51 views::View* contents_view_ = nullptr;
51 std::unique_ptr<CustomNotificationContentViewDelegate> 52 std::unique_ptr<CustomNotificationContentViewDelegate>
52 contents_view_delegate_; 53 contents_view_delegate_;
53 54
54 std::unique_ptr<views::Painter> focus_painter_; 55 std::unique_ptr<views::Painter> focus_painter_;
55 56
56 DISALLOW_COPY_AND_ASSIGN(CustomNotificationView); 57 DISALLOW_COPY_AND_ASSIGN(CustomNotificationView);
57 }; 58 };
58 59
59 } // namespace message_center 60 } // namespace message_center
60 61
61 #endif // UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ 62 #endif // UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698