| 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 3132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3143 params.transition = render_manager_.web_ui()->GetLinkTransitionType(); | 3143 params.transition = render_manager_.web_ui()->GetLinkTransitionType(); |
| 3144 | 3144 |
| 3145 // Note also that we hide the referrer for Web UI pages. We don't really | 3145 // Note also that we hide the referrer for Web UI pages. We don't really |
| 3146 // want web sites to see a referrer of "chrome://blah" (and some | 3146 // want web sites to see a referrer of "chrome://blah" (and some |
| 3147 // chrome: URLs might have search terms or other stuff we don't want to | 3147 // chrome: URLs might have search terms or other stuff we don't want to |
| 3148 // send to the site), so we send no referrer. | 3148 // send to the site), so we send no referrer. |
| 3149 params.referrer = Referrer(); | 3149 params.referrer = Referrer(); |
| 3150 | 3150 |
| 3151 // Navigations in Web UI pages count as browser-initiated navigations. | 3151 // Navigations in Web UI pages count as browser-initiated navigations. |
| 3152 params.is_renderer_initiated = false; | 3152 params.is_renderer_initiated = false; |
| 3153 |
| 3154 // TODO(creis): Remove this line. In the short term, it fixes a regression |
| 3155 // (http://crbug.com/313572) by partially reverting r231370. |
| 3156 // The underlying problem is that WebDataSource::replacesCurrentHistoryItem |
| 3157 // should be returning false when the CWS goes to the sign-in page. |
| 3158 // See http://crbug.com/311721. |
| 3159 params.should_replace_current_entry = false; |
| 3153 } | 3160 } |
| 3154 | 3161 |
| 3155 new_contents = OpenURL(params); | 3162 new_contents = OpenURL(params); |
| 3156 | 3163 |
| 3157 if (new_contents) { | 3164 if (new_contents) { |
| 3158 // Notify observers. | 3165 // Notify observers. |
| 3159 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3166 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3160 DidOpenRequestedURL(new_contents, | 3167 DidOpenRequestedURL(new_contents, |
| 3161 dest_url, | 3168 dest_url, |
| 3162 referrer, | 3169 referrer, |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3650 } | 3657 } |
| 3651 | 3658 |
| 3652 void WebContentsImpl::OnFrameRemoved( | 3659 void WebContentsImpl::OnFrameRemoved( |
| 3653 RenderViewHostImpl* render_view_host, | 3660 RenderViewHostImpl* render_view_host, |
| 3654 int64 frame_id) { | 3661 int64 frame_id) { |
| 3655 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3662 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3656 FrameDetached(render_view_host, frame_id)); | 3663 FrameDetached(render_view_host, frame_id)); |
| 3657 } | 3664 } |
| 3658 | 3665 |
| 3659 } // namespace content | 3666 } // namespace content |
| OLD | NEW |