OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/renderer_webkitclient_impl.h" | 5 #include "chrome/renderer/renderer_webkitclient_impl.h" |
6 | 6 |
7 #if defined(USE_SYSTEM_SQLITE) | 7 #if defined(USE_SYSTEM_SQLITE) |
8 #include <sqlite3.h> | 8 #include <sqlite3.h> |
9 #else | 9 #else |
10 #include "third_party/sqlite/preprocessed/sqlite3.h" | 10 #include "third_party/sqlite/preprocessed/sqlite3.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 new ViewHostMsg_SetCookie(routing_id, url, first_party_for_cookies, | 124 new ViewHostMsg_SetCookie(routing_id, url, first_party_for_cookies, |
125 value_utf8)); | 125 value_utf8)); |
126 } | 126 } |
127 | 127 |
128 WebString RendererWebKitClientImpl::cookies( | 128 WebString RendererWebKitClientImpl::cookies( |
129 const WebURL& url, const WebURL& first_party_for_cookies) { | 129 const WebURL& url, const WebURL& first_party_for_cookies) { |
130 // TODO(darin): Modify WebKit to pass the WebFrame. This code may be reached | 130 // TODO(darin): Modify WebKit to pass the WebFrame. This code may be reached |
131 // when there is no active script context. | 131 // when there is no active script context. |
132 int32 routing_id = RenderThread::RoutingIDForCurrentContext(); | 132 int32 routing_id = RenderThread::RoutingIDForCurrentContext(); |
133 | 133 |
134 // TODO(darin): We should use SendAndRunNestedMessageLoop here to avoid dead- | |
135 // locking the browser, but this causes a performance regression. Switching | |
136 // back to Send to verify. See http://crbug.com/36310. | |
137 | |
138 std::string value_utf8; | 134 std::string value_utf8; |
139 RenderThread::current()->Send( | 135 RenderThread::current()->SendAndRunNestedMessageLoop( |
140 new ViewHostMsg_GetCookies(routing_id, url, first_party_for_cookies, | 136 new ViewHostMsg_GetCookies(routing_id, url, first_party_for_cookies, |
141 &value_utf8)); | 137 &value_utf8)); |
142 | 138 |
143 return WebString::fromUTF8(value_utf8); | 139 return WebString::fromUTF8(value_utf8); |
144 } | 140 } |
145 | 141 |
146 bool RendererWebKitClientImpl::rawCookies( | 142 bool RendererWebKitClientImpl::rawCookies( |
147 const WebURL& url, | 143 const WebURL& url, |
148 const WebURL& first_party_for_cookies, | 144 const WebURL& first_party_for_cookies, |
149 WebVector<WebKit::WebCookie>* raw_cookies) { | 145 WebVector<WebKit::WebCookie>* raw_cookies) { |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 const WebKit::WebString& challenge, | 403 const WebKit::WebString& challenge, |
408 const WebKit::WebURL& url) { | 404 const WebKit::WebURL& url) { |
409 std::string signed_public_key; | 405 std::string signed_public_key; |
410 RenderThread::current()->Send(new ViewHostMsg_Keygen( | 406 RenderThread::current()->Send(new ViewHostMsg_Keygen( |
411 static_cast<uint32>(key_size_index), | 407 static_cast<uint32>(key_size_index), |
412 challenge.utf8(), | 408 challenge.utf8(), |
413 GURL(url), | 409 GURL(url), |
414 &signed_public_key)); | 410 &signed_public_key)); |
415 return WebString::fromUTF8(signed_public_key); | 411 return WebString::fromUTF8(signed_public_key); |
416 } | 412 } |
OLD | NEW |