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/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 if (!widget || !widget->IsRenderView()) | 117 if (!widget || !widget->IsRenderView()) |
118 return NULL; | 118 return NULL; |
119 return static_cast<RenderViewHostImpl*>(RenderWidgetHostImpl::From(widget)); | 119 return static_cast<RenderViewHostImpl*>(RenderWidgetHostImpl::From(widget)); |
120 } | 120 } |
121 | 121 |
122 // static | 122 // static |
123 RenderViewHost* RenderViewHost::From(RenderWidgetHost* rwh) { | 123 RenderViewHost* RenderViewHost::From(RenderWidgetHost* rwh) { |
124 return static_cast<RenderViewHostImpl*>(RenderWidgetHostImpl::From(rwh)); | 124 return static_cast<RenderViewHostImpl*>(RenderWidgetHostImpl::From(rwh)); |
125 } | 125 } |
126 | 126 |
| 127 // static |
| 128 void RenderViewHost::FilterURL(ChildProcessSecurityPolicy* policy, |
| 129 int renderer_id, |
| 130 bool empty_allowed, |
| 131 GURL* url) { |
| 132 RenderViewHostImpl::FilterURL(policy, renderer_id, empty_allowed, url); |
| 133 } |
127 /////////////////////////////////////////////////////////////////////////////// | 134 /////////////////////////////////////////////////////////////////////////////// |
128 // RenderViewHostImpl, public: | 135 // RenderViewHostImpl, public: |
129 | 136 |
130 // static | 137 // static |
131 RenderViewHostImpl* RenderViewHostImpl::FromID(int render_process_id, | 138 RenderViewHostImpl* RenderViewHostImpl::FromID(int render_process_id, |
132 int render_view_id) { | 139 int render_view_id) { |
133 return static_cast<RenderViewHostImpl*>( | 140 return static_cast<RenderViewHostImpl*>( |
134 RenderViewHost::FromID(render_process_id, render_view_id)); | 141 RenderViewHost::FromID(render_process_id, render_view_id)); |
135 } | 142 } |
136 | 143 |
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1545 #endif | 1552 #endif |
1546 | 1553 |
1547 void RenderViewHostImpl::SendOrientationChangeEvent(int orientation) { | 1554 void RenderViewHostImpl::SendOrientationChangeEvent(int orientation) { |
1548 Send(new ViewMsg_OrientationChangeEvent(GetRoutingID(), orientation)); | 1555 Send(new ViewMsg_OrientationChangeEvent(GetRoutingID(), orientation)); |
1549 } | 1556 } |
1550 | 1557 |
1551 void RenderViewHostImpl::ToggleSpeechInput() { | 1558 void RenderViewHostImpl::ToggleSpeechInput() { |
1552 Send(new InputTagSpeechMsg_ToggleSpeechInput(GetRoutingID())); | 1559 Send(new InputTagSpeechMsg_ToggleSpeechInput(GetRoutingID())); |
1553 } | 1560 } |
1554 | 1561 |
1555 void RenderViewHostImpl::FilterURL(ChildProcessSecurityPolicyImpl* policy, | 1562 void RenderViewHostImpl::FilterURL(ChildProcessSecurityPolicy* policy, |
1556 int renderer_id, | 1563 int renderer_id, |
1557 bool empty_allowed, | 1564 bool empty_allowed, |
1558 GURL* url) { | 1565 GURL* url) { |
1559 if (empty_allowed && url->is_empty()) | 1566 if (empty_allowed && url->is_empty()) |
1560 return; | 1567 return; |
1561 | 1568 |
1562 if (!url->is_valid()) { | 1569 if (!url->is_valid()) { |
1563 // Have to use about:blank for the denied case, instead of an empty GURL. | 1570 // Have to use about:blank for the denied case, instead of an empty GURL. |
1564 // This is because the browser treats navigation to an empty GURL as a | 1571 // This is because the browser treats navigation to an empty GURL as a |
1565 // navigation to the home page. This is often a privileged page | 1572 // navigation to the home page. This is often a privileged page |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1837 // can cause navigations to be ignored in OnMsgNavigate. | 1844 // can cause navigations to be ignored in OnMsgNavigate. |
1838 is_waiting_for_beforeunload_ack_ = false; | 1845 is_waiting_for_beforeunload_ack_ = false; |
1839 is_waiting_for_unload_ack_ = false; | 1846 is_waiting_for_unload_ack_ = false; |
1840 } | 1847 } |
1841 | 1848 |
1842 void RenderViewHostImpl::ClearPowerSaveBlockers() { | 1849 void RenderViewHostImpl::ClearPowerSaveBlockers() { |
1843 STLDeleteValues(&power_save_blockers_); | 1850 STLDeleteValues(&power_save_blockers_); |
1844 } | 1851 } |
1845 | 1852 |
1846 } // namespace content | 1853 } // namespace content |
OLD | NEW |