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.
5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_DELEGATE_H_
10 // A class with this type may be registered via
11 // BrowserThread::SetDelegate.
13 // If registered as such, it will receive an Init() call right before
14 // the BrowserThread in question starts its message loop (and right
15 // after the BrowserThread has done its own initialization), and a
16 // CleanUp call right after the message loop ends (and before the
17 // BrowserThread has done its own clean-up).
18 class BrowserThreadDelegate
{
20 virtual ~BrowserThreadDelegate() {}
22 // Called just prior to starting the message loop.
23 virtual void Init() = 0;
25 // Called just after the message loop ends.
26 virtual void CleanUp() = 0;
29 } // namespace content
31 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_DELEGATE_H_