summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_process_sub_thread.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 22:14:25 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 22:14:25 +0000
commitb0f146ff51b2b37a2e3549c875fb42365ded7a21 (patch)
treefc4ee794e7feacbc3d73dfb763b5a90bb11f1041 /content/browser/browser_process_sub_thread.cc
parent190efec7b7523f42c0f7e9a5ad80c79c3f68a7d1 (diff)
downloadchromium_src-b0f146ff51b2b37a2e3549c875fb42365ded7a21.zip
chromium_src-b0f146ff51b2b37a2e3549c875fb42365ded7a21.tar.gz
chromium_src-b0f146ff51b2b37a2e3549c875fb42365ded7a21.tar.bz2
Create a very simple TabContentsView (and not fully implemented yet) and add more supporting code to be able to load a page. Right now it's not rendering, but I suspect it's something small, and the patch has gotten large so I figure it's time to send it for review.
BUG=90445 Review URL: http://codereview.chromium.org/7906008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101395 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_process_sub_thread.cc')
-rw-r--r--content/browser/browser_process_sub_thread.cc41
1 files changed, 41 insertions, 0 deletions
diff --git a/content/browser/browser_process_sub_thread.cc b/content/browser/browser_process_sub_thread.cc
new file mode 100644
index 0000000..ed904a3
--- /dev/null
+++ b/content/browser/browser_process_sub_thread.cc
@@ -0,0 +1,41 @@
+// 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.
+
+#include "content/browser/browser_process_sub_thread.h"
+
+#include "build/build_config.h"
+#include "content/common/notification_service.h"
+
+#if defined(OS_WIN)
+#include <Objbase.h>
+#endif
+
+BrowserProcessSubThread::BrowserProcessSubThread(BrowserThread::ID identifier)
+ : BrowserThread(identifier) {}
+
+BrowserProcessSubThread::~BrowserProcessSubThread() {
+ // We cannot rely on our base class to stop the thread since we want our
+ // CleanUp function to run.
+ Stop();
+}
+
+void BrowserProcessSubThread::Init() {
+#if defined(OS_WIN)
+ // Initializes the COM library on the current thread.
+ CoInitialize(NULL);
+#endif
+
+ notification_service_ = new NotificationService;
+}
+
+void BrowserProcessSubThread::CleanUp() {
+ delete notification_service_;
+ notification_service_ = NULL;
+
+#if defined(OS_WIN)
+ // Closes the COM library on the current thread. CoInitialize must
+ // be balanced by a corresponding call to CoUninitialize.
+ CoUninitialize();
+#endif
+}