Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1845)

Unified Diff: content/public/browser/browser_thread_delegate.h

Issue 8477004: Have content/ create and destroy its own threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix official build, avoid DCHECK in official Linux/ChromeOS builds. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/browser_thread.h ('k') | content/shell/shell_browser_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/browser_thread_delegate.h
diff --git a/content/public/browser/browser_thread_delegate.h b/content/public/browser/browser_thread_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..ae9fc7b6f0e4ffd4ef099e540c5a291cd85c508a
--- /dev/null
+++ b/content/public/browser/browser_thread_delegate.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_DELEGATE_H_
+#define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_DELEGATE_H_
+#pragma once
+
+namespace content {
+
+// A class with this type may be registered via
+// BrowserThread::SetDelegate.
+//
+// If registered as such, it will receive an Init() call right before
+// the BrowserThread in question starts its message loop (and right
+// after the BrowserThread has done its own initialization), and a
+// CleanUp call right after the message loop ends (and before the
+// BrowserThread has done its own clean-up).
+class BrowserThreadDelegate {
+ public:
+ virtual ~BrowserThreadDelegate() {}
+
+ // Called just prior to starting the message loop.
+ virtual void Init() = 0;
+
+ // Called just after the message loop ends.
+ virtual void CleanUp() = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_DELEGATE_H_
« no previous file with comments | « content/public/browser/browser_thread.h ('k') | content/shell/shell_browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698