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_BROWSER_THREAD_DELEGATE_H_ | |
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_DELEGATE_H_ | |
7 #pragma once | |
8 | |
9 namespace content { | |
10 | |
11 // A class with this type may be registered via | |
12 // BrowserThread::SetDelegate. | |
13 // | |
14 // If registered as such, it will receive an Init() call right before | |
15 // the BrowserThread in question starts its message loop (and right | |
16 // after the BrowserThread has done its own initialization), and a | |
17 // CleanUp call right after the message loop ends (and before the | |
18 // BrowserThread has done its own clean-up). | |
19 class BrowserThreadDelegate { | |
20 public: | |
21 BrowserThreadDelegate() {} | |
jam
2011/11/23 22:39:35
nit: we've been avoiding these in the content API
Jói
2011/11/28 12:51:15
Done.
| |
22 virtual ~BrowserThreadDelegate() {} | |
23 | |
24 // Called just prior to starting the message loop. | |
25 virtual void Init() = 0; | |
26 | |
27 // Called just after the message loop ends. | |
28 virtual void CleanUp() = 0; | |
29 }; | |
30 | |
31 } // namespace content | |
32 | |
33 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_DELEGATE_H_ | |
OLD | NEW |