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

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

Issue 2696523002: Stop notifications from being clipped on resize. (Closed)
Patch Set: Add additional comments. Created 3 years, 10 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/BUILD.gn ('k') | ui/message_center/views/message_center_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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_MESSAGE_CENTER_VIEW_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_
6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 size_t NumMessageViewsForTest() const; 55 size_t NumMessageViewsForTest() const;
56 56
57 void SetSettingsVisible(bool visible); 57 void SetSettingsVisible(bool visible);
58 void OnSettingsChanged(); 58 void OnSettingsChanged();
59 bool settings_visible() const { return settings_visible_; } 59 bool settings_visible() const { return settings_visible_; }
60 MessageCenterTray* tray() { return tray_; } 60 MessageCenterTray* tray() { return tray_; }
61 61
62 void SetIsClosing(bool is_closing); 62 void SetIsClosing(bool is_closing);
63 63
64 protected: 64 protected:
65 // Potentially sets the reposition target, and then returns whether or not it
66 // was was set.
67 virtual bool SetRepositionTarget();
68
65 // Overridden from views::View: 69 // Overridden from views::View:
66 void Layout() override; 70 void Layout() override;
67 gfx::Size GetPreferredSize() const override; 71 gfx::Size GetPreferredSize() const override;
68 int GetHeightForWidth(int width) const override; 72 int GetHeightForWidth(int width) const override;
69 bool OnMouseWheel(const ui::MouseWheelEvent& event) override; 73 bool OnMouseWheel(const ui::MouseWheelEvent& event) override;
70 void OnMouseExited(const ui::MouseEvent& event) override; 74 void OnMouseExited(const ui::MouseEvent& event) override;
71 75
72 // Overridden from MessageCenterObserver: 76 // Overridden from MessageCenterObserver:
73 void OnNotificationAdded(const std::string& id) override; 77 void OnNotificationAdded(const std::string& id) override;
74 void OnNotificationRemoved(const std::string& id, bool by_user) override; 78 void OnNotificationRemoved(const std::string& id, bool by_user) override;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 Mode mode_ = Mode::BUTTONS_ONLY; 154 Mode mode_ = Mode::BUTTONS_ONLY;
151 155
152 std::unique_ptr<MessageViewContextMenuController> context_menu_controller_; 156 std::unique_ptr<MessageViewContextMenuController> context_menu_controller_;
153 157
154 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); 158 DISALLOW_COPY_AND_ASSIGN(MessageCenterView);
155 }; 159 };
156 160
157 } // namespace message_center 161 } // namespace message_center
158 162
159 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ 163 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_
OLDNEW
« no previous file with comments | « ui/message_center/BUILD.gn ('k') | ui/message_center/views/message_center_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698