| OLD | NEW |
| 1 // Copyright (c) 2009 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> |
| 11 #include <mshtmcid.h> | 11 #include <mshtmcid.h> |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 | 634 |
| 635 UpdateNavigationState(nav_info); | 635 UpdateNavigationState(nav_info); |
| 636 } | 636 } |
| 637 | 637 |
| 638 void ChromeActiveDocument::UpdateNavigationState( | 638 void ChromeActiveDocument::UpdateNavigationState( |
| 639 const IPC::NavigationInfo& new_navigation_info) { | 639 const IPC::NavigationInfo& new_navigation_info) { |
| 640 HRESULT hr = S_OK; | 640 HRESULT hr = S_OK; |
| 641 bool is_title_changed = (navigation_info_.title != new_navigation_info.title); | 641 bool is_title_changed = (navigation_info_.title != new_navigation_info.title); |
| 642 bool is_ssl_state_changed = | 642 bool is_ssl_state_changed = |
| 643 (navigation_info_.security_style != new_navigation_info.security_style) || | 643 (navigation_info_.security_style != new_navigation_info.security_style) || |
| 644 (navigation_info_.has_mixed_content != | 644 (navigation_info_.displayed_mixed_content != |
| 645 new_navigation_info.has_mixed_content); | 645 new_navigation_info.displayed_mixed_content) || |
| 646 (navigation_info_.ran_mixed_content != |
| 647 new_navigation_info.ran_mixed_content); |
| 646 | 648 |
| 647 if (is_ssl_state_changed) { | 649 if (is_ssl_state_changed) { |
| 648 int lock_status = SECURELOCK_SET_UNSECURE; | 650 int lock_status = SECURELOCK_SET_UNSECURE; |
| 649 switch (new_navigation_info.security_style) { | 651 switch (new_navigation_info.security_style) { |
| 650 case SECURITY_STYLE_AUTHENTICATION_BROKEN: | 652 case SECURITY_STYLE_AUTHENTICATION_BROKEN: |
| 651 lock_status = SECURELOCK_SET_SECUREUNKNOWNBIT; | 653 lock_status = SECURELOCK_SET_SECUREUNKNOWNBIT; |
| 652 break; | 654 break; |
| 653 case SECURITY_STYLE_AUTHENTICATED: | 655 case SECURITY_STYLE_AUTHENTICATED: |
| 654 lock_status = new_navigation_info.has_mixed_content ? | 656 lock_status = new_navigation_info.displayed_mixed_content ? |
| 655 SECURELOCK_SET_MIXED : SECURELOCK_SET_SECUREUNKNOWNBIT; | 657 SECURELOCK_SET_MIXED : SECURELOCK_SET_SECUREUNKNOWNBIT; |
| 656 break; | 658 break; |
| 657 default: | 659 default: |
| 658 break; | 660 break; |
| 659 } | 661 } |
| 660 | 662 |
| 661 ScopedVariant secure_lock_status(lock_status); | 663 ScopedVariant secure_lock_status(lock_status); |
| 662 IEExec(&CGID_ShellDocView, INTERNAL_CMDID_SET_SSL_LOCK, | 664 IEExec(&CGID_ShellDocView, INTERNAL_CMDID_SET_SSL_LOCK, |
| 663 OLECMDEXECOPT_DODEFAULT, secure_lock_status.AsInput(), NULL); | 665 OLECMDEXECOPT_DODEFAULT, secure_lock_status.AsInput(), NULL); |
| 664 } | 666 } |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 ScopedComPtr<ITridentService2> trident_services; | 1252 ScopedComPtr<ITridentService2> trident_services; |
| 1251 trident_services.QueryFrom(shell_browser); | 1253 trident_services.QueryFrom(shell_browser); |
| 1252 if (trident_services) { | 1254 if (trident_services) { |
| 1253 trident_services->FirePrivacyImpactedStateChange(wparam); | 1255 trident_services->FirePrivacyImpactedStateChange(wparam); |
| 1254 } else { | 1256 } else { |
| 1255 NOTREACHED() << "Failed to retrieve IWebBrowser2 interface."; | 1257 NOTREACHED() << "Failed to retrieve IWebBrowser2 interface."; |
| 1256 } | 1258 } |
| 1257 return 0; | 1259 return 0; |
| 1258 } | 1260 } |
| 1259 | 1261 |
| OLD | NEW |