| Index: base/threading/com_thread_win.cc
|
| ===================================================================
|
| --- base/threading/com_thread_win.cc (revision 0)
|
| +++ base/threading/com_thread_win.cc (working copy)
|
| @@ -0,0 +1,29 @@
|
| +// Copyright (c) 2012 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 "base/threading/com_thread.h"
|
| +
|
| +namespace base {
|
| +
|
| +bool ComThread::Start() {
|
| + if (!use_mta_)
|
| + return Thread::Start();
|
| +
|
| + // STA COM objects require a UI message loop in order to pump Windows
|
| + // messages, which they may use for various purposes.
|
| + Thread::Options thread_options(MessageLoop::TYPE_UI, 0);
|
| + return StartWithOptions(thread_options);
|
| +}
|
| +
|
| +void ComThread::Init() {
|
| + com_initializer_.reset(use_mta_ ?
|
| + new win::ScopedCOMInitializer(win::ScopedCOMInitializer::kMTA) :
|
| + new win::ScopedCOMInitializer());
|
| +}
|
| +
|
| +void ComThread::CleanUp() {
|
| + com_initializer_.reset();
|
| +}
|
| +
|
| +} // namespace base
|
|
|
| Property changes on: base/threading/com_thread_win.cc
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| ## -0,0 +1 ##
|
| +LF
|
| \ No newline at end of property
|
|
|