| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |