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

Side by Side Diff: ui/message_center/views/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
« no previous file with comments | « ui/message_center/views/message_view.h ('k') | ui/message_center/views/notification_view.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_NOTIFICATION_VIEW_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_
6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 28 matching lines...) Expand all
39 const Notification& notification); 39 const Notification& notification);
40 ~NotificationView() override; 40 ~NotificationView() override;
41 41
42 // Overridden from views::View: 42 // Overridden from views::View:
43 gfx::Size GetPreferredSize() const override; 43 gfx::Size GetPreferredSize() const override;
44 int GetHeightForWidth(int width) const override; 44 int GetHeightForWidth(int width) const override;
45 void Layout() override; 45 void Layout() override;
46 void OnFocus() override; 46 void OnFocus() override;
47 void ScrollRectToVisible(const gfx::Rect& rect) override; 47 void ScrollRectToVisible(const gfx::Rect& rect) override;
48 gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override; 48 gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override;
49 void OnMouseEntered(const ui::MouseEvent& event) override;
50 void OnMouseExited(const ui::MouseEvent& event) override;
49 51
50 // Overridden from MessageView: 52 // Overridden from MessageView:
51 void UpdateWithNotification(const Notification& notification) override; 53 void UpdateWithNotification(const Notification& notification) override;
52 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 54 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
53 bool IsCloseButtonFocused() const override; 55 bool IsCloseButtonFocused() const override;
54 void RequestFocusOnCloseButton() override; 56 void RequestFocusOnCloseButton() override;
55 bool IsPinned() const override; 57 bool IsPinned() const override;
58 void UpdateControlButtonsVisibility() override;
56 59
57 protected: 60 protected:
58 views::ImageButton* close_button() { return close_button_.get(); } 61 views::ImageButton* close_button() { return close_button_.get(); }
59 62
60 private: 63 private:
61 FRIEND_TEST_ALL_PREFIXES(NotificationViewTest, CreateOrUpdateTest); 64 FRIEND_TEST_ALL_PREFIXES(NotificationViewTest, CreateOrUpdateTest);
62 FRIEND_TEST_ALL_PREFIXES(NotificationViewTest, 65 FRIEND_TEST_ALL_PREFIXES(NotificationViewTest,
63 CreateOrUpdateTestSettingsButton); 66 CreateOrUpdateTestSettingsButton);
64 FRIEND_TEST_ALL_PREFIXES(NotificationViewTest, FormatContextMessageTest); 67 FRIEND_TEST_ALL_PREFIXES(NotificationViewTest, FormatContextMessageTest);
65 FRIEND_TEST_ALL_PREFIXES(NotificationViewTest, SettingsButtonTest); 68 FRIEND_TEST_ALL_PREFIXES(NotificationViewTest, SettingsButtonTest);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 std::vector<views::View*> separators_; 119 std::vector<views::View*> separators_;
117 std::unique_ptr<views::ImageButton> close_button_ = nullptr; 120 std::unique_ptr<views::ImageButton> close_button_ = nullptr;
118 std::unique_ptr<views::ImageView> small_image_view_; 121 std::unique_ptr<views::ImageView> small_image_view_;
119 122
120 DISALLOW_COPY_AND_ASSIGN(NotificationView); 123 DISALLOW_COPY_AND_ASSIGN(NotificationView);
121 }; 124 };
122 125
123 } // namespace message_center 126 } // namespace message_center
124 127
125 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ 128 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_
OLDNEW
« no previous file with comments | « ui/message_center/views/message_view.h ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698