OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 5678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5689 return false; | 5689 return false; |
5690 | 5690 |
5691 // Navigations initiated within Webkit are not sent out to the external host | 5691 // Navigations initiated within Webkit are not sent out to the external host |
5692 // in the following cases. | 5692 // in the following cases. |
5693 // 1. The url scheme is not http/https | 5693 // 1. The url scheme is not http/https |
5694 // 2. There is no opener and this is not the first url being opened by this | 5694 // 2. There is no opener and this is not the first url being opened by this |
5695 // RenderView. | 5695 // RenderView. |
5696 // 3. The origin of the url and the opener is the same in which case the | 5696 // 3. The origin of the url and the opener is the same in which case the |
5697 // opener relationship is maintained. | 5697 // opener relationship is maintained. |
5698 // 4. Reloads/form submits/back forward navigations | 5698 // 4. Reloads/form submits/back forward navigations |
5699 if (!url.SchemeIs("http") && !url.SchemeIs("https")) | 5699 if (!url.SchemeIs("http") && !url.SchemeIs("https") && |
| 5700 !url.SchemeIs("httpsv")) |
5700 return false; | 5701 return false; |
5701 | 5702 |
5702 // Not interested in reloads/form submits/resubmits/back forward navigations. | 5703 // Not interested in reloads/form submits/resubmits/back forward navigations. |
5703 if (type != WebKit::WebNavigationTypeReload && | 5704 if (type != WebKit::WebNavigationTypeReload && |
5704 type != WebKit::WebNavigationTypeFormSubmitted && | 5705 type != WebKit::WebNavigationTypeFormSubmitted && |
5705 type != WebKit::WebNavigationTypeFormResubmitted && | 5706 type != WebKit::WebNavigationTypeFormResubmitted && |
5706 type != WebKit::WebNavigationTypeBackForward) { | 5707 type != WebKit::WebNavigationTypeBackForward) { |
5707 // The opener relationship between the new window and the parent allows the | 5708 // The opener relationship between the new window and the parent allows the |
5708 // new window to script the parent and vice versa. This is not allowed if | 5709 // new window to script the parent and vice versa. This is not allowed if |
5709 // the origins of the two domains are different. This can be treated as a | 5710 // the origins of the two domains are different. This can be treated as a |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5782 } | 5783 } |
5783 } | 5784 } |
5784 | 5785 |
5785 void RenderView::OnContextMenuClosed( | 5786 void RenderView::OnContextMenuClosed( |
5786 const webkit_glue::CustomContextMenuContext& custom_context) { | 5787 const webkit_glue::CustomContextMenuContext& custom_context) { |
5787 if (custom_context.is_pepper_menu) | 5788 if (custom_context.is_pepper_menu) |
5788 pepper_delegate_.OnContextMenuClosed(custom_context); | 5789 pepper_delegate_.OnContextMenuClosed(custom_context); |
5789 else | 5790 else |
5790 context_menu_node_.reset(); | 5791 context_menu_node_.reset(); |
5791 } | 5792 } |
OLD | NEW |