diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-23 04:33:52 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-23 04:33:52 +0000 |
commit | 458e9521995681381912ece90eb2a8ea210ae07d (patch) | |
tree | d5eeabdee1104f65f42990bbd7edc238a57480d5 /chrome_frame/utils.h | |
parent | 1822c9949f19195ca0000f0be929a5398a7c24e6 (diff) | |
download | chromium_src-458e9521995681381912ece90eb2a8ea210ae07d.zip chromium_src-458e9521995681381912ece90eb2a8ea210ae07d.tar.gz chromium_src-458e9521995681381912ece90eb2a8ea210ae07d.tar.bz2 |
Add methods to base::Thread to allow Windows consumers to ask for COM to be intialized on the Thread.
This makes one functional change: when COM is initialized in STA mode, the Thread is forced to use a TYPE_UI message loop. Most of the modified consumers here didn't previously do that, but after discussion with cpu and siggi, it seems safest, even though it's more heavyweight.
BUG=none
TEST=none
Review URL: https://codereview.chromium.org/11048029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163503 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/utils.h')
-rw-r--r-- | chrome_frame/utils.h | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/chrome_frame/utils.h b/chrome_frame/utils.h index 389a8f5..2204571 100644 --- a/chrome_frame/utils.h +++ b/chrome_frame/utils.h @@ -16,8 +16,6 @@ #include "base/logging.h" #include "base/metrics/histogram.h" #include "base/string16.h" -#include "base/threading/thread.h" -#include "base/win/scoped_com_initializer.h" #include "base/win/scoped_comptr.h" #include "googleurl/src/gurl.h" #include "ui/gfx/rect.h" @@ -396,32 +394,6 @@ STDMETHODIMP QueryInterfaceIfDelegateSupports(void* obj, REFIID iid, #define COM_INTERFACE_BLIND_DELEGATE() \ COM_INTERFACE_ENTRY_FUNC_BLIND(0, CheckOutgoingInterface<_ComMapClass>) -// Thread that enters STA and has a UI message loop. -class STAThread : public base::Thread { - public: - explicit STAThread(const char *name) : Thread(name) {} - virtual ~STAThread() { - Stop(); - } - - bool Start() { - return StartWithOptions(Options(MessageLoop::TYPE_UI, 0)); - } - - private: - virtual void Init() OVERRIDE { - com_initializer_.reset(new base::win::ScopedCOMInitializer()); - } - - virtual void CleanUp() OVERRIDE { - com_initializer_.reset(); - } - - scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; - - DISALLOW_COPY_AND_ASSIGN(STAThread); -}; - std::wstring GuidToString(const GUID& guid); // The urls retrieved from the IMoniker interface don't contain the anchor |