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 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1711 creator->document().securityOrigin().toString().utf8(); | 1711 creator->document().securityOrigin().toString().utf8(); |
1712 params.opener_suppressed = creator->willSuppressOpenerInNewFrame(); | 1712 params.opener_suppressed = creator->willSuppressOpenerInNewFrame(); |
1713 params.disposition = NavigationPolicyToDisposition(policy); | 1713 params.disposition = NavigationPolicyToDisposition(policy); |
1714 if (!request.isNull()) | 1714 if (!request.isNull()) |
1715 params.target_url = request.url(); | 1715 params.target_url = request.url(); |
1716 | 1716 |
1717 int32 routing_id = MSG_ROUTING_NONE; | 1717 int32 routing_id = MSG_ROUTING_NONE; |
1718 int32 surface_id = 0; | 1718 int32 surface_id = 0; |
1719 int64 cloned_session_storage_namespace_id; | 1719 int64 cloned_session_storage_namespace_id; |
1720 | 1720 |
| 1721 creator->consumeUserGesture(); |
1721 RenderThread::Get()->Send( | 1722 RenderThread::Get()->Send( |
1722 new ViewHostMsg_CreateWindow(params, | 1723 new ViewHostMsg_CreateWindow(params, |
1723 &routing_id, | 1724 &routing_id, |
1724 &surface_id, | 1725 &surface_id, |
1725 &cloned_session_storage_namespace_id)); | 1726 &cloned_session_storage_namespace_id)); |
1726 if (routing_id == MSG_ROUTING_NONE) | 1727 if (routing_id == MSG_ROUTING_NONE) |
1727 return NULL; | 1728 return NULL; |
1728 | 1729 |
1729 // TODO(fsamuel): The host renderer needs to be able to control whether | 1730 // TODO(fsamuel): The host renderer needs to be able to control whether |
1730 // the guest renderer is allowed to do this or not. This current | 1731 // the guest renderer is allowed to do this or not. This current |
(...skipping 4154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5885 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5886 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5886 return !!RenderThreadImpl::current()->compositor_thread(); | 5887 return !!RenderThreadImpl::current()->compositor_thread(); |
5887 } | 5888 } |
5888 | 5889 |
5889 void RenderViewImpl::OnJavaBridgeInit() { | 5890 void RenderViewImpl::OnJavaBridgeInit() { |
5890 DCHECK(!java_bridge_dispatcher_); | 5891 DCHECK(!java_bridge_dispatcher_); |
5891 #if defined(ENABLE_JAVA_BRIDGE) | 5892 #if defined(ENABLE_JAVA_BRIDGE) |
5892 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5893 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5893 #endif | 5894 #endif |
5894 } | 5895 } |
OLD | NEW |