| 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()) | 803 if (!navigation_handle->IsInMainFrame() || navigation_handle->IsSamePage()) |
| 804 return; | 804 return; |
| 805 | 805 |
| 806 const content::NavigationController& controller = | 806 const content::NavigationController& controller = |
| 807 web_contents()->GetController(); | 807 web_contents()->GetController(); |
| 808 content::NavigationEntry* last_committed_entry = | 808 content::NavigationEntry* last_committed_entry = |
| 809 controller.GetLastCommittedEntry(); | 809 controller.GetLastCommittedEntry(); |
| 810 if (last_committed_entry) | 810 if (last_committed_entry) |
| 811 previous_url_ = last_committed_entry->GetURL(); | 811 previous_url_ = last_committed_entry->GetURL(); |
| 812 | 812 |
| 813 // If we're displaying a network error page do not reset the content | 813 // If we're displaying a network error page do not reset the content |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 static_cast<MicrophoneCameraStateFlags>( | 910 static_cast<MicrophoneCameraStateFlags>( |
| 911 TabSpecificContentSettings::MICROPHONE_ACCESSED | | 911 TabSpecificContentSettings::MICROPHONE_ACCESSED | |
| 912 TabSpecificContentSettings::MICROPHONE_BLOCKED | | 912 TabSpecificContentSettings::MICROPHONE_BLOCKED | |
| 913 TabSpecificContentSettings::CAMERA_ACCESSED | | 913 TabSpecificContentSettings::CAMERA_ACCESSED | |
| 914 TabSpecificContentSettings::CAMERA_BLOCKED); | 914 TabSpecificContentSettings::CAMERA_BLOCKED); |
| 915 OnMediaStreamPermissionSet( | 915 OnMediaStreamPermissionSet( |
| 916 web_contents()->GetLastCommittedURL(), | 916 web_contents()->GetLastCommittedURL(), |
| 917 media_blocked, | 917 media_blocked, |
| 918 std::string(), std::string(), std::string(), std::string()); | 918 std::string(), std::string(), std::string(), std::string()); |
| 919 } | 919 } |
| OLD | NEW |