OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/content_settings/tab_specific_content_settings.h" | 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ContentBlocked, | 793 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ContentBlocked, |
794 OnContentBlockedWithDetail) | 794 OnContentBlockedWithDetail) |
795 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidUseKeygen, OnDidUseKeygen) | 795 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidUseKeygen, OnDidUseKeygen) |
796 IPC_MESSAGE_UNHANDLED(handled = false) | 796 IPC_MESSAGE_UNHANDLED(handled = false) |
797 IPC_END_MESSAGE_MAP() | 797 IPC_END_MESSAGE_MAP() |
798 return handled; | 798 return handled; |
799 } | 799 } |
800 | 800 |
801 void TabSpecificContentSettings::DidStartNavigation( | 801 void TabSpecificContentSettings::DidStartNavigation( |
802 content::NavigationHandle* navigation_handle) { | 802 content::NavigationHandle* navigation_handle) { |
803 if (!navigation_handle->IsInMainFrame() || navigation_handle->IsSamePage()) | 803 if (!navigation_handle->IsInMainFrame() || navigation_handle->IsSamePage() || |
| 804 navigation_handle->IsSynchronousNavigation()) { |
804 return; | 805 return; |
| 806 } |
805 | 807 |
806 const content::NavigationController& controller = | 808 const content::NavigationController& controller = |
807 web_contents()->GetController(); | 809 web_contents()->GetController(); |
808 content::NavigationEntry* last_committed_entry = | 810 content::NavigationEntry* last_committed_entry = |
809 controller.GetLastCommittedEntry(); | 811 controller.GetLastCommittedEntry(); |
810 if (last_committed_entry) | 812 if (last_committed_entry) |
811 previous_url_ = last_committed_entry->GetURL(); | 813 previous_url_ = last_committed_entry->GetURL(); |
812 | 814 |
813 // If we're displaying a network error page do not reset the content | 815 // If we're displaying a network error page do not reset the content |
814 // settings delegate's cookies so the user has a chance to modify cookie | 816 // settings delegate's cookies so the user has a chance to modify cookie |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 static_cast<MicrophoneCameraStateFlags>( | 911 static_cast<MicrophoneCameraStateFlags>( |
910 TabSpecificContentSettings::MICROPHONE_ACCESSED | | 912 TabSpecificContentSettings::MICROPHONE_ACCESSED | |
911 TabSpecificContentSettings::MICROPHONE_BLOCKED | | 913 TabSpecificContentSettings::MICROPHONE_BLOCKED | |
912 TabSpecificContentSettings::CAMERA_ACCESSED | | 914 TabSpecificContentSettings::CAMERA_ACCESSED | |
913 TabSpecificContentSettings::CAMERA_BLOCKED); | 915 TabSpecificContentSettings::CAMERA_BLOCKED); |
914 OnMediaStreamPermissionSet( | 916 OnMediaStreamPermissionSet( |
915 web_contents()->GetLastCommittedURL(), | 917 web_contents()->GetLastCommittedURL(), |
916 media_blocked, | 918 media_blocked, |
917 std::string(), std::string(), std::string(), std::string()); | 919 std::string(), std::string(), std::string(), std::string()); |
918 } | 920 } |
OLD | NEW |