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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2678 if (details.is_navigation_to_different_page()) { | 2678 if (details.is_navigation_to_different_page()) { |
2679 // Clear the status bubble. This is a workaround for a bug where WebKit | 2679 // Clear the status bubble. This is a workaround for a bug where WebKit |
2680 // doesn't let us know that the cursor left an element during a | 2680 // doesn't let us know that the cursor left an element during a |
2681 // transition (this is also why the mouse cursor remains as a hand after | 2681 // transition (this is also why the mouse cursor remains as a hand after |
2682 // clicking on a link); see bugs 1184641 and 980803. We don't want to | 2682 // clicking on a link); see bugs 1184641 and 980803. We don't want to |
2683 // clear the bubble when a user navigates to a named anchor in the same | 2683 // clear the bubble when a user navigates to a named anchor in the same |
2684 // page. | 2684 // page. |
2685 UpdateTargetURL(details.entry->GetPageID(), GURL()); | 2685 UpdateTargetURL(details.entry->GetPageID(), GURL()); |
2686 } | 2686 } |
2687 | 2687 |
2688 if (!details.is_in_page) { | 2688 // When navigating back from a ref URL to the top non ref one is_in_page |
2689 // is false even the navigation is in fact in page | |
abarth-chromium
2013/08/01 20:48:32
Should we fix that?
| |
2690 // (see AreURLsInPageNavigation()). In order to not clear | |
2691 // the displayed_insecure_content_ flag too eagerly check the navigation type | |
2692 // as well. | |
2693 if (!details.is_in_page && | |
2694 details.type != content::NAVIGATION_TYPE_IN_PAGE) { | |
2689 // Once the main frame is navigated, we're no longer considered to have | 2695 // Once the main frame is navigated, we're no longer considered to have |
2690 // displayed insecure content. | 2696 // displayed insecure content. |
2691 displayed_insecure_content_ = false; | 2697 displayed_insecure_content_ = false; |
2692 SSLManager::NotifySSLInternalStateChanged( | 2698 SSLManager::NotifySSLInternalStateChanged( |
2693 GetController().GetBrowserContext()); | 2699 GetController().GetBrowserContext()); |
2694 } | 2700 } |
2695 | 2701 |
2696 // Notify observers about navigation. | 2702 // Notify observers about navigation. |
2697 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2703 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2698 DidNavigateMainFrame(details, params)); | 2704 DidNavigateMainFrame(details, params)); |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3714 } | 3720 } |
3715 | 3721 |
3716 void WebContentsImpl::ClearAllPowerSaveBlockers() { | 3722 void WebContentsImpl::ClearAllPowerSaveBlockers() { |
3717 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin()); | 3723 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin()); |
3718 i != power_save_blockers_.end(); ++i) | 3724 i != power_save_blockers_.end(); ++i) |
3719 STLDeleteValues(&power_save_blockers_[i->first]); | 3725 STLDeleteValues(&power_save_blockers_[i->first]); |
3720 power_save_blockers_.clear(); | 3726 power_save_blockers_.clear(); |
3721 } | 3727 } |
3722 | 3728 |
3723 } // namespace content | 3729 } // namespace content |
OLD | NEW |