OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WM_HOST_FOREIGN_TEST_WINDOW_HOST_H_ |
| 6 #define WM_HOST_FOREIGN_TEST_WINDOW_HOST_H_ |
| 7 |
| 8 #include "ui/gfx/native_widget_types.h" |
| 9 |
| 10 namespace wm { |
| 11 |
| 12 class ForeignTestWindowHost { |
| 13 public: |
| 14 virtual ~ForeignTestWindowHost() {} |
| 15 |
| 16 // Creates a new ForeignTestWindowHost. Caller owns return value and must |
| 17 // call Destroy() to delete instance. |
| 18 static ForeignTestWindowHost* Create(gfx::AcceleratedWidget parent); |
| 19 |
| 20 // This is guaranteed to run all tasks up to the last Sync() call. |
| 21 static void RunAllPendingInMessageLoop(); |
| 22 |
| 23 // These functions should only be called on a thread with an IO message loop. |
| 24 virtual void Initialize() = 0; |
| 25 virtual void Delete() = 0; |
| 26 virtual void Show() = 0; |
| 27 virtual void Hide() = 0; |
| 28 virtual void Destroy() = 0; |
| 29 virtual void Sync() = 0; |
| 30 }; |
| 31 |
| 32 } // namespace wm |
| 33 |
| 34 #endif // WM_HOST_FOREIGN_TEST_WINDOW_HOST_H_ |
OLD | NEW |