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 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1651 // HACK!! This code suppresses javascript: URLs from being added to | 1651 // HACK!! This code suppresses javascript: URLs from being added to |
1652 // session history, which is what we want to do for javascript: URLs that | 1652 // session history, which is what we want to do for javascript: URLs that |
1653 // do not generate content. What we really need is a message from the | 1653 // do not generate content. What we really need is a message from the |
1654 // renderer telling us that a new page was not created. The same message | 1654 // renderer telling us that a new page was not created. The same message |
1655 // could be used for mailto: URLs and the like. | 1655 // could be used for mailto: URLs and the like. |
1656 if (entry.GetURL().SchemeIs(kJavaScriptScheme)) | 1656 if (entry.GetURL().SchemeIs(kJavaScriptScheme)) |
1657 return false; | 1657 return false; |
1658 } | 1658 } |
1659 | 1659 |
1660 // Notify observers about navigation. | 1660 // Notify observers about navigation. |
1661 FOR_EACH_OBSERVER(WebContentsObserver, | 1661 FOR_EACH_OBSERVER( |
1662 observers_, | 1662 WebContentsObserver, |
1663 NavigateToPendingEntry(entry.GetURL(), reload_type)); | 1663 observers_, |
| 1664 DidStartNavigationToPendingEntry(entry.GetURL(), reload_type)); |
1664 | 1665 |
1665 if (delegate_) | 1666 if (delegate_) |
1666 delegate_->DidNavigateToPendingEntry(this); | 1667 delegate_->DidNavigateToPendingEntry(this); |
1667 | 1668 |
1668 return true; | 1669 return true; |
1669 } | 1670 } |
1670 | 1671 |
1671 void WebContentsImpl::SetHistoryLengthAndPrune( | 1672 void WebContentsImpl::SetHistoryLengthAndPrune( |
1672 const SiteInstance* site_instance, | 1673 const SiteInstance* site_instance, |
1673 int history_length, | 1674 int history_length, |
(...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3682 } | 3683 } |
3683 | 3684 |
3684 void WebContentsImpl::OnFrameRemoved( | 3685 void WebContentsImpl::OnFrameRemoved( |
3685 RenderViewHostImpl* render_view_host, | 3686 RenderViewHostImpl* render_view_host, |
3686 int64 frame_id) { | 3687 int64 frame_id) { |
3687 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3688 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
3688 FrameDetached(render_view_host, frame_id)); | 3689 FrameDetached(render_view_host, frame_id)); |
3689 } | 3690 } |
3690 | 3691 |
3691 } // namespace content | 3692 } // namespace content |
OLD | NEW |