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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.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 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1662 creator->document().securityOrigin().toString().utf8(); | 1662 creator->document().securityOrigin().toString().utf8(); |
1663 params.opener_suppressed = creator->willSuppressOpenerInNewFrame(); | 1663 params.opener_suppressed = creator->willSuppressOpenerInNewFrame(); |
1664 params.disposition = NavigationPolicyToDisposition(policy); | 1664 params.disposition = NavigationPolicyToDisposition(policy); |
1665 if (!request.isNull()) | 1665 if (!request.isNull()) |
1666 params.target_url = request.url(); | 1666 params.target_url = request.url(); |
1667 | 1667 |
1668 int32 routing_id = MSG_ROUTING_NONE; | 1668 int32 routing_id = MSG_ROUTING_NONE; |
1669 int32 surface_id = 0; | 1669 int32 surface_id = 0; |
1670 int64 cloned_session_storage_namespace_id; | 1670 int64 cloned_session_storage_namespace_id; |
1671 | 1671 |
| 1672 creator->consumeUserGesture(); |
1672 RenderThread::Get()->Send( | 1673 RenderThread::Get()->Send( |
1673 new ViewHostMsg_CreateWindow(params, | 1674 new ViewHostMsg_CreateWindow(params, |
1674 &routing_id, | 1675 &routing_id, |
1675 &surface_id, | 1676 &surface_id, |
1676 &cloned_session_storage_namespace_id)); | 1677 &cloned_session_storage_namespace_id)); |
1677 if (routing_id == MSG_ROUTING_NONE) | 1678 if (routing_id == MSG_ROUTING_NONE) |
1678 return NULL; | 1679 return NULL; |
1679 | 1680 |
1680 // TODO(fsamuel): The host renderer needs to be able to control whether | 1681 // TODO(fsamuel): The host renderer needs to be able to control whether |
1681 // the guest renderer is allowed to do this or not. This current | 1682 // the guest renderer is allowed to do this or not. This current |
(...skipping 4085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5767 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5768 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5768 return !!RenderThreadImpl::current()->compositor_thread(); | 5769 return !!RenderThreadImpl::current()->compositor_thread(); |
5769 } | 5770 } |
5770 | 5771 |
5771 void RenderViewImpl::OnJavaBridgeInit() { | 5772 void RenderViewImpl::OnJavaBridgeInit() { |
5772 DCHECK(!java_bridge_dispatcher_); | 5773 DCHECK(!java_bridge_dispatcher_); |
5773 #if defined(ENABLE_JAVA_BRIDGE) | 5774 #if defined(ENABLE_JAVA_BRIDGE) |
5774 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5775 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5775 #endif | 5776 #endif |
5776 } | 5777 } |
OLD | NEW |