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 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1797 MakeNavigateParams(entry, controller_, delegate_, reload_type, | 1797 MakeNavigateParams(entry, controller_, delegate_, reload_type, |
1798 &navigate_params); | 1798 &navigate_params); |
1799 dest_render_view_host->Navigate(navigate_params); | 1799 dest_render_view_host->Navigate(navigate_params); |
1800 | 1800 |
1801 if (entry.GetPageID() == -1) { | 1801 if (entry.GetPageID() == -1) { |
1802 // HACK!! This code suppresses javascript: URLs from being added to | 1802 // HACK!! This code suppresses javascript: URLs from being added to |
1803 // session history, which is what we want to do for javascript: URLs that | 1803 // session history, which is what we want to do for javascript: URLs that |
1804 // do not generate content. What we really need is a message from the | 1804 // do not generate content. What we really need is a message from the |
1805 // renderer telling us that a new page was not created. The same message | 1805 // renderer telling us that a new page was not created. The same message |
1806 // could be used for mailto: URLs and the like. | 1806 // could be used for mailto: URLs and the like. |
1807 if (entry.GetURL().SchemeIs(chrome::kJavaScriptScheme)) | 1807 if (entry.GetURL().SchemeIs(kJavaScriptScheme)) |
1808 return false; | 1808 return false; |
1809 } | 1809 } |
1810 | 1810 |
1811 // Notify observers about navigation. | 1811 // Notify observers about navigation. |
1812 FOR_EACH_OBSERVER(WebContentsObserver, | 1812 FOR_EACH_OBSERVER(WebContentsObserver, |
1813 observers_, | 1813 observers_, |
1814 NavigateToPendingEntry(entry.GetURL(), reload_type)); | 1814 NavigateToPendingEntry(entry.GetURL(), reload_type)); |
1815 | 1815 |
1816 if (delegate_) | 1816 if (delegate_) |
1817 delegate_->DidNavigateToPendingEntry(this); | 1817 delegate_->DidNavigateToPendingEntry(this); |
(...skipping 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3731 } | 3731 } |
3732 | 3732 |
3733 void WebContentsImpl::ClearAllPowerSaveBlockers() { | 3733 void WebContentsImpl::ClearAllPowerSaveBlockers() { |
3734 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin()); | 3734 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin()); |
3735 i != power_save_blockers_.end(); ++i) | 3735 i != power_save_blockers_.end(); ++i) |
3736 STLDeleteValues(&power_save_blockers_[i->first]); | 3736 STLDeleteValues(&power_save_blockers_[i->first]); |
3737 power_save_blockers_.clear(); | 3737 power_save_blockers_.clear(); |
3738 } | 3738 } |
3739 | 3739 |
3740 } // namespace content | 3740 } // namespace content |
OLD | NEW |