OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1582 // treat such cases as browser navigations (in which we will create a new | 1582 // treat such cases as browser navigations (in which we will create a new |
1583 // renderer for a cross-site navigation), rather than WebKit navigations. | 1583 // renderer for a cross-site navigation), rather than WebKit navigations. |
1584 // | 1584 // |
1585 // We use the following heuristic to decide whether to fork a new page in its | 1585 // We use the following heuristic to decide whether to fork a new page in its |
1586 // own process: | 1586 // own process: |
1587 // The parent page must open a new tab to about:blank, set the new tab's | 1587 // The parent page must open a new tab to about:blank, set the new tab's |
1588 // window.opener to null, and then redirect the tab to a cross-site URL using | 1588 // window.opener to null, and then redirect the tab to a cross-site URL using |
1589 // JavaScript. | 1589 // JavaScript. |
1590 bool is_fork = | 1590 bool is_fork = |
1591 // Must start from a tab showing about:blank, which is later redirected. | 1591 // Must start from a tab showing about:blank, which is later redirected. |
1592 frame->GetURL() == GURL("about:blank") && | 1592 frame->GetURL() == GURL(chrome::kAboutBlankURL) && |
1593 // Must be the first real navigation of the tab. | 1593 // Must be the first real navigation of the tab. |
1594 GetHistoryBackListCount() < 1 && | 1594 GetHistoryBackListCount() < 1 && |
1595 GetHistoryForwardListCount() < 1 && | 1595 GetHistoryForwardListCount() < 1 && |
1596 // The parent page must have set the child's window.opener to null before | 1596 // The parent page must have set the child's window.opener to null before |
1597 // redirecting to the desired URL. | 1597 // redirecting to the desired URL. |
1598 frame->GetOpener() == NULL && | 1598 frame->GetOpener() == NULL && |
1599 // Must be a top-level frame. | 1599 // Must be a top-level frame. |
1600 frame->GetParent() == NULL && | 1600 frame->GetParent() == NULL && |
1601 // Must not have issued the request from this page. GetExtraData is NULL | 1601 // Must not have issued the request from this page. GetExtraData is NULL |
1602 // when the navigation is being done by something outside the page. | 1602 // when the navigation is being done by something outside the page. |
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2965 DCHECK(audio_renderers_.Lookup(stream_id) != NULL); | 2965 DCHECK(audio_renderers_.Lookup(stream_id) != NULL); |
2966 Send(new ViewHostMsg_SetAudioVolume(routing_id_, stream_id, left, right)); | 2966 Send(new ViewHostMsg_SetAudioVolume(routing_id_, stream_id, left, right)); |
2967 } | 2967 } |
2968 | 2968 |
2969 void RenderView::OnResize(const gfx::Size& new_size, | 2969 void RenderView::OnResize(const gfx::Size& new_size, |
2970 const gfx::Rect& resizer_rect) { | 2970 const gfx::Rect& resizer_rect) { |
2971 if (webview()) | 2971 if (webview()) |
2972 webview()->HideAutofillPopup(); | 2972 webview()->HideAutofillPopup(); |
2973 RenderWidget::OnResize(new_size, resizer_rect); | 2973 RenderWidget::OnResize(new_size, resizer_rect); |
2974 } | 2974 } |
OLD | NEW |