| 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_POPUP_COLLECTION_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ |
| 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 namespace base { | 25 namespace base { |
| 26 class RunLoop; | 26 class RunLoop; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace views { | 29 namespace views { |
| 30 class Widget; | 30 class Widget; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace gfx { | 33 namespace gfx { |
| 34 class Display; | 34 class Display; |
| 35 class Screen; | 35 } |
| 36 |
| 37 namespace display { |
| 38 using Display = gfx::Display; |
| 36 } | 39 } |
| 37 | 40 |
| 38 namespace message_center { | 41 namespace message_center { |
| 39 namespace test { | 42 namespace test { |
| 40 class MessagePopupCollectionTest; | 43 class MessagePopupCollectionTest; |
| 41 } | 44 } |
| 42 | 45 |
| 43 class MessageCenter; | 46 class MessageCenter; |
| 44 class MessageCenterTray; | 47 class MessageCenterTray; |
| 45 class MessageViewContextMenuController; | 48 class MessageViewContextMenuController; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 95 |
| 93 // Runs the next step in update/animate sequence, if the defer counter is not | 96 // Runs the next step in update/animate sequence, if the defer counter is not |
| 94 // zero. Otherwise, simply waits when it becomes zero. | 97 // zero. Otherwise, simply waits when it becomes zero. |
| 95 void DoUpdateIfPossible(); | 98 void DoUpdateIfPossible(); |
| 96 | 99 |
| 97 // Removes the toast from our internal list of toasts; this is called when the | 100 // Removes the toast from our internal list of toasts; this is called when the |
| 98 // toast is irrevocably closed (such as within RemoveToast). | 101 // toast is irrevocably closed (such as within RemoveToast). |
| 99 void ForgetToast(ToastContentsView* toast); | 102 void ForgetToast(ToastContentsView* toast); |
| 100 | 103 |
| 101 // Called when the display bounds has been changed. Used in Windows only. | 104 // Called when the display bounds has been changed. Used in Windows only. |
| 102 void OnDisplayMetricsChanged(const gfx::Display& display); | 105 void OnDisplayMetricsChanged(const display::Display& display); |
| 103 | 106 |
| 104 // Used by ToastContentsView to locate itself. | 107 // Used by ToastContentsView to locate itself. |
| 105 gfx::NativeView parent() const { return parent_; } | 108 gfx::NativeView parent() const { return parent_; } |
| 106 | 109 |
| 107 private: | 110 private: |
| 108 friend class test::MessagePopupCollectionTest; | 111 friend class test::MessagePopupCollectionTest; |
| 109 typedef std::list<ToastContentsView*> Toasts; | 112 typedef std::list<ToastContentsView*> Toasts; |
| 110 | 113 |
| 111 // Iterates toasts and starts closing them. | 114 // Iterates toasts and starts closing them. |
| 112 std::set<std::string> CloseAllWidgets(); | 115 std::set<std::string> CloseAllWidgets(); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // Gives out weak pointers to toast contents views which have an unrelated | 185 // Gives out weak pointers to toast contents views which have an unrelated |
| 183 // lifetime. Must remain the last member variable. | 186 // lifetime. Must remain the last member variable. |
| 184 base::WeakPtrFactory<MessagePopupCollection> weak_factory_; | 187 base::WeakPtrFactory<MessagePopupCollection> weak_factory_; |
| 185 | 188 |
| 186 DISALLOW_COPY_AND_ASSIGN(MessagePopupCollection); | 189 DISALLOW_COPY_AND_ASSIGN(MessagePopupCollection); |
| 187 }; | 190 }; |
| 188 | 191 |
| 189 } // namespace message_center | 192 } // namespace message_center |
| 190 | 193 |
| 191 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ | 194 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ |
| OLD | NEW |