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

Unified Diff: chrome_frame/utils.h

Issue 545093: Refactor host network (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/urlmon_url_request_private.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/utils.h
===================================================================
--- chrome_frame/utils.h (revision 37418)
+++ chrome_frame/utils.h (working copy)
@@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/thread.h"
// utils.h : Various utility functions and classes
@@ -315,6 +316,25 @@
extern const wchar_t kChromeFrameHeadlessMode[];
+// Thread that enters STA and has a UI message loop.
+class STAThread : public base::Thread {
+ public:
+ explicit STAThread(const char *name) : Thread(name) {}
+ bool Start() {
+ return StartWithOptions(Options(MessageLoop::TYPE_UI, 0));
+ }
+ protected:
+ // Called just prior to starting the message loop
+ virtual void Init() {
+ ::CoInitialize(0);
+ }
+
+ // Called just after the message loop ends
+ virtual void CleanUp() {
+ ::CoUninitialize();
+ }
+};
+
// The urls retrieved from the IMoniker interface don't contain the anchor
// portion of the actual url navigated to. This function checks whether the
// url passed in the bho_url parameter contains an anchor and if yes checks
« no previous file with comments | « chrome_frame/urlmon_url_request_private.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698