| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 // a window.open call from javascript, in which case the current IE tab | 257 // a window.open call from javascript, in which case the current IE tab |
| 258 // will attach to an existing ExternalTabContainer instance. | 258 // will attach to an existing ExternalTabContainer instance. |
| 259 bool is_new_navigation = true; | 259 bool is_new_navigation = true; |
| 260 bool is_chrome_protocol = false; | 260 bool is_chrome_protocol = false; |
| 261 | 261 |
| 262 if (!ParseUrl(url, &is_new_navigation, &is_chrome_protocol, &url)) { | 262 if (!ParseUrl(url, &is_new_navigation, &is_chrome_protocol, &url)) { |
| 263 DLOG(WARNING) << __FUNCTION__ << " Failed to parse url:" << url; | 263 DLOG(WARNING) << __FUNCTION__ << " Failed to parse url:" << url; |
| 264 return E_INVALIDARG; | 264 return E_INVALIDARG; |
| 265 } | 265 } |
| 266 | 266 |
| 267 const std::string& referrer = mgr ? mgr->referrer() : EmptyString(); | 267 std::string referrer = mgr ? mgr->referrer() : EmptyString(); |
| 268 // With CTransaction patch we have more robust way to grab the referrer for |
| 269 // each top-level-switch-to-CF request by peeking at our sniffing data |
| 270 // object that lives inside the bind context. |
| 271 if (g_patch_helper.state() == PatchHelper::PATCH_PROTOCOL && info) { |
| 272 scoped_refptr<ProtData> prot_data = info->get_prot_data(); |
| 273 if (prot_data) |
| 274 referrer = prot_data->referrer(); |
| 275 } |
| 276 |
| 268 if (!LaunchUrl(url, referrer, is_new_navigation)) { | 277 if (!LaunchUrl(url, referrer, is_new_navigation)) { |
| 269 NOTREACHED() << __FUNCTION__ << " Failed to launch url:" << url; | 278 NOTREACHED() << __FUNCTION__ << " Failed to launch url:" << url; |
| 270 return E_INVALIDARG; | 279 return E_INVALIDARG; |
| 271 } | 280 } |
| 272 | 281 |
| 273 if (!is_chrome_protocol) | 282 if (!is_chrome_protocol) |
| 274 url_fetcher_.SetInfoForUrl(url, moniker_name, bind_context); | 283 url_fetcher_.SetInfoForUrl(url, moniker_name, bind_context); |
| 275 | 284 |
| 276 THREAD_SAFE_UMA_HISTOGRAM_CUSTOM_COUNTS("ChromeFrame.FullTabLaunchType", | 285 THREAD_SAFE_UMA_HISTOGRAM_CUSTOM_COUNTS("ChromeFrame.FullTabLaunchType", |
| 277 is_chrome_protocol, 0, 1, 2); | 286 is_chrome_protocol, 0, 1, 2); |
| (...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 shell_browser.Receive()); | 1253 shell_browser.Receive()); |
| 1245 DCHECK(shell_browser.get() != NULL); | 1254 DCHECK(shell_browser.get() != NULL); |
| 1246 ScopedComPtr<ITridentService2> trident_services; | 1255 ScopedComPtr<ITridentService2> trident_services; |
| 1247 trident_services.QueryFrom(shell_browser); | 1256 trident_services.QueryFrom(shell_browser); |
| 1248 if (trident_services) | 1257 if (trident_services) |
| 1249 trident_services->FirePrivacyImpactedStateChange(wparam); | 1258 trident_services->FirePrivacyImpactedStateChange(wparam); |
| 1250 else | 1259 else |
| 1251 NOTREACHED() << "Failed to retrieve IWebBrowser2 interface."; | 1260 NOTREACHED() << "Failed to retrieve IWebBrowser2 interface."; |
| 1252 return 0; | 1261 return 0; |
| 1253 } | 1262 } |
| OLD | NEW |