| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_AURA_DESKTOP_H_ | 5 #ifndef UI_AURA_DESKTOP_H_ |
| 6 #define UI_AURA_DESKTOP_H_ | 6 #define UI_AURA_DESKTOP_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 void ActivateTopmostWindow(); | 87 void ActivateTopmostWindow(); |
| 88 | 88 |
| 89 // Deactivates |window| and activates the topmost window. Does nothing if | 89 // Deactivates |window| and activates the topmost window. Does nothing if |
| 90 // |window| is not a topmost window, or there are no other suitable windows to | 90 // |window| is not a topmost window, or there are no other suitable windows to |
| 91 // activate. | 91 // activate. |
| 92 void Deactivate(Window* window); | 92 void Deactivate(Window* window); |
| 93 | 93 |
| 94 // Invoked from RootWindow when |window| is being destroyed. | 94 // Invoked from RootWindow when |window| is being destroyed. |
| 95 void WindowDestroying(Window* window); | 95 void WindowDestroying(Window* window); |
| 96 | 96 |
| 97 // Invoked when a window is added. |
| 98 void WindowAdded(Window* window); |
| 99 |
| 100 // Invoked when a window is removed. |
| 101 void WillRemoveWindow(Window* window); |
| 102 |
| 97 // Returns the desktop's dispatcher. The result should only be passed to | 103 // Returns the desktop's dispatcher. The result should only be passed to |
| 98 // MessageLoopForUI::Run() or MessageLoopForUI::RunAllPendingWithDispatcher(), | 104 // MessageLoopForUI::Run() or MessageLoopForUI::RunAllPendingWithDispatcher(), |
| 99 // or used to dispatch an event by |Dispatch(const NativeEvent&)| on it. | 105 // or used to dispatch an event by |Dispatch(const NativeEvent&)| on it. |
| 100 // It must never be stored. | 106 // It must never be stored. |
| 101 MessageLoop::Dispatcher* GetDispatcher(); | 107 MessageLoop::Dispatcher* GetDispatcher(); |
| 102 | 108 |
| 103 static Desktop* GetInstance(); | 109 static Desktop* GetInstance(); |
| 104 | 110 |
| 105 private: | 111 private: |
| 106 // Overridden from ui::CompositorDelegate | 112 // Overridden from ui::CompositorDelegate |
| (...skipping 20 matching lines...) Expand all Loading... |
| 127 // Are we in the process of being destroyed? Used to avoid processing during | 133 // Are we in the process of being destroyed? Used to avoid processing during |
| 128 // destruction. | 134 // destruction. |
| 129 bool in_destructor_; | 135 bool in_destructor_; |
| 130 | 136 |
| 131 DISALLOW_COPY_AND_ASSIGN(Desktop); | 137 DISALLOW_COPY_AND_ASSIGN(Desktop); |
| 132 }; | 138 }; |
| 133 | 139 |
| 134 } // namespace aura | 140 } // namespace aura |
| 135 | 141 |
| 136 #endif // UI_AURA_DESKTOP_H_ | 142 #endif // UI_AURA_DESKTOP_H_ |
| OLD | NEW |