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

Side by Side Diff: chrome_frame/urlmon_moniker.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome_frame/urlmon_moniker.h" 5 #include "chrome_frame/urlmon_moniker.h"
6 6
7 #include <shlguid.h> 7 #include <shlguid.h>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 bool NavigationManager::IsTopLevelUrl(const wchar_t* url) { 74 bool NavigationManager::IsTopLevelUrl(const wchar_t* url) {
75 return CompareUrlsWithoutFragment(url_.c_str(), url); 75 return CompareUrlsWithoutFragment(url_.c_str(), url);
76 } 76 }
77 77
78 ///////////////////////////////////////// 78 /////////////////////////////////////////
79 79
80 NavigationManager* NavigationManager::GetThreadInstance() { 80 NavigationManager* NavigationManager::GetThreadInstance() {
81 return thread_singleton_.Pointer()->Get(); 81 return thread_singleton_.Pointer()->Get();
82 } 82 }
83 83
84 void NavigationManager::RegisterThreadInstance() { 84 void NavigationManager::RegisterThreadInstance(IWebBrowser2* web_browser2) {
85 DCHECK(GetThreadInstance() == NULL); 85 DCHECK(GetThreadInstance() == NULL);
86 DCHECK(web_browser2 != NULL);
86 thread_singleton_.Pointer()->Set(this); 87 thread_singleton_.Pointer()->Set(this);
88 web_browser2_ = web_browser2;
87 } 89 }
88 90
89 void NavigationManager::UnregisterThreadInstance() { 91 void NavigationManager::UnregisterThreadInstance() {
90 DCHECK(GetThreadInstance() == this); 92 DCHECK(GetThreadInstance() == this);
91 thread_singleton_.Pointer()->Set(NULL); 93 thread_singleton_.Pointer()->Set(NULL);
94 web_browser2_.Release();
92 } 95 }
93 96
94 ///////////////////////////////////////// 97 /////////////////////////////////////////
95 98
96 // static 99 // static
97 bool MonikerPatch::Initialize() { 100 bool MonikerPatch::Initialize() {
98 if (IS_PATCHED(IMoniker)) { 101 if (IS_PATCHED(IMoniker)) {
99 DLOG(WARNING) << __FUNCTION__ << " called more than once."; 102 DLOG(WARNING) << __FUNCTION__ << " called more than once.";
100 return true; 103 return true;
101 } 104 }
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 252
250 // If the binding terminates before the data could be played back 253 // If the binding terminates before the data could be played back
251 // now is the chance. Sometimes OnStopBinding happens after this returns 254 // now is the chance. Sometimes OnStopBinding happens after this returns
252 // and then it's too late. 255 // and then it's too late.
253 if ((S_OK == hr) && callback) 256 if ((S_OK == hr) && callback)
254 callback->MayPlayBack(BSCF_LASTDATANOTIFICATION); 257 callback->MayPlayBack(BSCF_LASTDATANOTIFICATION);
255 258
256 return hr; 259 return hr;
257 } 260 }
258 261
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698