OLD | NEW |
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 // Implementation of ChromeActiveDocument | 5 // Implementation of ChromeActiveDocument |
6 #include "chrome_frame/chrome_active_document.h" | 6 #include "chrome_frame/chrome_active_document.h" |
7 | 7 |
8 #include <hlink.h> | 8 #include <hlink.h> |
9 #include <htiface.h> | 9 #include <htiface.h> |
10 #include <initguid.h> | 10 #include <initguid.h> |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 } | 239 } |
240 | 240 |
241 NavigationManager* mgr = NavigationManager::GetThreadInstance(); | 241 NavigationManager* mgr = NavigationManager::GetThreadInstance(); |
242 DLOG_IF(ERROR, !mgr) << "Couldn't get instance of NavigationManager"; | 242 DLOG_IF(ERROR, !mgr) << "Couldn't get instance of NavigationManager"; |
243 | 243 |
244 std::wstring url; | 244 std::wstring url; |
245 | 245 |
246 ScopedComPtr<BindContextInfo> info; | 246 ScopedComPtr<BindContextInfo> info; |
247 BindContextInfo::FromBindContext(bind_context, info.Receive()); | 247 BindContextInfo::FromBindContext(bind_context, info.Receive()); |
248 DCHECK(info); | 248 DCHECK(info); |
249 if (info && !info->url().empty()) { | 249 if (info && !info->GetUrl().empty()) { |
250 url = info->url(); | 250 url = info->GetUrl(); |
251 } else { | 251 } else { |
252 // If the original URL contains an anchor, then the URL queried | 252 // If the original URL contains an anchor, then the URL queried |
253 // from the moniker does not contain the anchor. To workaround | 253 // from the moniker does not contain the anchor. To workaround |
254 // this we retrieve the URL from our BHO. | 254 // this we retrieve the URL from our BHO. |
255 url = GetActualUrlFromMoniker(moniker_name, bind_context, | 255 url = GetActualUrlFromMoniker(moniker_name, bind_context, |
256 mgr ? mgr->url(): std::wstring()); | 256 mgr ? mgr->url(): std::wstring()); |
257 } | 257 } |
258 | 258 |
259 ChromeFrameUrl cf_url; | 259 ChromeFrameUrl cf_url; |
260 if (!cf_url.Parse(url)) { | 260 if (!cf_url.Parse(url)) { |
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1390 return true; | 1390 return true; |
1391 | 1391 |
1392 if (new_navigation_info.url != navigation_info_.url) | 1392 if (new_navigation_info.url != navigation_info_.url) |
1393 return true; | 1393 return true; |
1394 | 1394 |
1395 if (new_navigation_info.referrer != navigation_info_.referrer) | 1395 if (new_navigation_info.referrer != navigation_info_.referrer) |
1396 return true; | 1396 return true; |
1397 | 1397 |
1398 return false; | 1398 return false; |
1399 } | 1399 } |
OLD | NEW |