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

Side by Side Diff: chrome/browser/browser_process_sub_thread.cc

Issue 7906008: Create a very simple TabContentsView (and not fully implemented yet) and add more supporting code... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 3 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 #include "build/build_config.h"
6 #include "chrome/browser/browser_process_sub_thread.h"
7 #include "content/common/notification_service.h"
8
9 #if defined(OS_WIN)
10 #include <Objbase.h>
11 #endif
12
13 BrowserProcessSubThread::BrowserProcessSubThread(BrowserThread::ID identifier)
14 : BrowserThread(identifier) {}
15
16 BrowserProcessSubThread::~BrowserProcessSubThread() {
17 // We cannot rely on our base class to stop the thread since we want our
18 // CleanUp function to run.
19 Stop();
20 }
21
22 void BrowserProcessSubThread::Init() {
23 #if defined(OS_WIN)
24 // Initializes the COM library on the current thread.
25 CoInitialize(NULL);
26 #endif
27
28 notification_service_ = new NotificationService;
29 }
30
31 void BrowserProcessSubThread::CleanUp() {
32 delete notification_service_;
33 notification_service_ = NULL;
34
35 #if defined(OS_WIN)
36 // Closes the COM library on the current thread. CoInitialize must
37 // be balanced by a corresponding call to CoUninitialize.
38 CoUninitialize();
39 #endif
40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698