OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_IO_THREAD_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_IO_THREAD_DELEGATE_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/basictypes.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 // Some embedders may want to attach complex state to the IO thread, |
| 14 // that is initialized before anything else happens on the thread, and |
| 15 // torn down as the last thing that occurs on the thread. |
| 16 // |
| 17 // This is the interface to the object implementors need to provide |
| 18 // via BrowserMainParts::PreMainMessageLoopRun to enable such |
| 19 // initialization and teardown. |
| 20 class IOThreadDelegate { |
| 21 public: |
| 22 virtual ~IOThreadDelegate() {} |
| 23 |
| 24 // Called as the first thing to happen on the IO thread. |
| 25 virtual void Init() = 0; |
| 26 |
| 27 // Called as the last thing processed on the IO thread. |
| 28 virtual void CleanUp() = 0; |
| 29 }; |
| 30 |
| 31 } // namespace content |
| 32 |
| 33 #endif // CONTENT_PUBLIC_BROWSER_IO_THREAD_DELEGATE_H_ |
OLD | NEW |