OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_FRAME_UTILS_H_ | 5 #ifndef CHROME_FRAME_UTILS_H_ |
6 #define CHROME_FRAME_UTILS_H_ | 6 #define CHROME_FRAME_UTILS_H_ |
7 | 7 |
8 #include <OAidl.h> | 8 #include <OAidl.h> |
9 #include <objidl.h> | 9 #include <objidl.h> |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 QueryInterfaceIfDelegateSupports<_ComMapClass>) | 380 QueryInterfaceIfDelegateSupports<_ComMapClass>) |
381 | 381 |
382 // Queries the delegated COM object for an interface, bypassing the wrapper. | 382 // Queries the delegated COM object for an interface, bypassing the wrapper. |
383 #define COM_INTERFACE_BLIND_DELEGATE() \ | 383 #define COM_INTERFACE_BLIND_DELEGATE() \ |
384 COM_INTERFACE_ENTRY_FUNC_BLIND(0, CheckOutgoingInterface<_ComMapClass>) | 384 COM_INTERFACE_ENTRY_FUNC_BLIND(0, CheckOutgoingInterface<_ComMapClass>) |
385 | 385 |
386 // Thread that enters STA and has a UI message loop. | 386 // Thread that enters STA and has a UI message loop. |
387 class STAThread : public base::Thread { | 387 class STAThread : public base::Thread { |
388 public: | 388 public: |
389 explicit STAThread(const char *name) : Thread(name) {} | 389 explicit STAThread(const char *name) : Thread(name) {} |
| 390 ~STAThread() { |
| 391 Stop(); |
| 392 } |
390 bool Start() { | 393 bool Start() { |
391 return StartWithOptions(Options(MessageLoop::TYPE_UI, 0)); | 394 return StartWithOptions(Options(MessageLoop::TYPE_UI, 0)); |
392 } | 395 } |
393 protected: | 396 protected: |
394 // Called just prior to starting the message loop | 397 // Called just prior to starting the message loop |
395 virtual void Init() { | 398 virtual void Init() { |
396 ::CoInitialize(0); | 399 ::CoInitialize(0); |
397 } | 400 } |
398 | 401 |
399 // Called just after the message loop ends | 402 // Called just after the message loop ends |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 bool IsChromeFrameDocument(IWebBrowser2* web_browser); | 603 bool IsChromeFrameDocument(IWebBrowser2* web_browser); |
601 | 604 |
602 // Increases the wininet connection limit for HTTP 1.0/1.1 connections to the | 605 // Increases the wininet connection limit for HTTP 1.0/1.1 connections to the |
603 // value passed in. This is only done if the existing connection limit is | 606 // value passed in. This is only done if the existing connection limit is |
604 // lesser than the connection limit passed in. This function attempts to | 607 // lesser than the connection limit passed in. This function attempts to |
605 // increase the connection count once per process. | 608 // increase the connection count once per process. |
606 // Returns true on success. | 609 // Returns true on success. |
607 bool IncreaseWinInetConnections(DWORD connections); | 610 bool IncreaseWinInetConnections(DWORD connections); |
608 | 611 |
609 #endif // CHROME_FRAME_UTILS_H_ | 612 #endif // CHROME_FRAME_UTILS_H_ |
OLD | NEW |