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 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1757 creator->document().securityOrigin().toString().utf8(); | 1757 creator->document().securityOrigin().toString().utf8(); |
1758 params.opener_suppressed = creator->willSuppressOpenerInNewFrame(); | 1758 params.opener_suppressed = creator->willSuppressOpenerInNewFrame(); |
1759 params.disposition = NavigationPolicyToDisposition(policy); | 1759 params.disposition = NavigationPolicyToDisposition(policy); |
1760 if (!request.isNull()) | 1760 if (!request.isNull()) |
1761 params.target_url = request.url(); | 1761 params.target_url = request.url(); |
1762 | 1762 |
1763 int32 routing_id = MSG_ROUTING_NONE; | 1763 int32 routing_id = MSG_ROUTING_NONE; |
1764 int32 surface_id = 0; | 1764 int32 surface_id = 0; |
1765 int64 cloned_session_storage_namespace_id; | 1765 int64 cloned_session_storage_namespace_id; |
1766 | 1766 |
1767 creator->consumeUserGesture(); | |
1768 RenderThread::Get()->Send( | 1767 RenderThread::Get()->Send( |
1769 new ViewHostMsg_CreateWindow(params, | 1768 new ViewHostMsg_CreateWindow(params, |
1770 &routing_id, | 1769 &routing_id, |
1771 &surface_id, | 1770 &surface_id, |
1772 &cloned_session_storage_namespace_id)); | 1771 &cloned_session_storage_namespace_id)); |
1773 if (routing_id == MSG_ROUTING_NONE) | 1772 if (routing_id == MSG_ROUTING_NONE) |
1774 return NULL; | 1773 return NULL; |
1775 | 1774 |
| 1775 creator->consumeUserGesture(); |
| 1776 |
1776 RenderViewImpl* view = RenderViewImpl::Create( | 1777 RenderViewImpl* view = RenderViewImpl::Create( |
1777 routing_id_, | 1778 routing_id_, |
1778 renderer_preferences_, | 1779 renderer_preferences_, |
1779 webkit_preferences_, | 1780 webkit_preferences_, |
1780 shared_popup_counter_, | 1781 shared_popup_counter_, |
1781 routing_id, | 1782 routing_id, |
1782 surface_id, | 1783 surface_id, |
1783 cloned_session_storage_namespace_id, | 1784 cloned_session_storage_namespace_id, |
1784 frame_name, | 1785 frame_name, |
1785 true, | 1786 true, |
(...skipping 4632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6418 } | 6419 } |
6419 #endif | 6420 #endif |
6420 | 6421 |
6421 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6422 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
6422 TransportDIB::Handle dib_handle) { | 6423 TransportDIB::Handle dib_handle) { |
6423 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6424 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
6424 RenderProcess::current()->ReleaseTransportDIB(dib); | 6425 RenderProcess::current()->ReleaseTransportDIB(dib); |
6425 } | 6426 } |
6426 | 6427 |
6427 } // namespace content | 6428 } // namespace content |
OLD | NEW |