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

Unified Diff: chrome_frame/utils.cc

Issue 6493002: A number of poorly written IE BHO's crash IE if ChromeFrame is the currently ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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/utils.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.cc
===================================================================
--- chrome_frame/utils.cc (revision 74374)
+++ chrome_frame/utils.cc (working copy)
@@ -39,6 +39,8 @@
#include "net/base/escape.h"
#include "net/http/http_util.h"
+#include "chrome_tab.h" // NOLINT
+
using base::win::RegKey;
using base::win::ScopedComPtr;
@@ -1583,3 +1585,21 @@
DCHECK(module_version_info.get() != NULL);
return module_version_info->file_version();
}
+
+bool IsChromeFrameDocument(IWebBrowser2* web_browser) {
+ if (!web_browser)
+ return false;
+
+ ScopedComPtr<IDispatch> doc;
+ web_browser->get_Document(doc.Receive());
+ if (doc) {
+ // Detect if CF is rendering based on whether the document is a
+ // ChromeActiveDocument. Detecting based on hwnd is problematic as
+ // the CF Active Document window may not have been created yet.
+ ScopedComPtr<IChromeFrame> chrome_frame;
+ chrome_frame.QueryFrom(doc);
+ return chrome_frame.get() != NULL;
+ }
+ return false;
+}
+
« no previous file with comments | « chrome_frame/utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698