| 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 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/platform_file.h" | 9 #include "base/platform_file.h" |
| 10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // Let the browser know we generated cacheable metadata for this resource. The | 218 // Let the browser know we generated cacheable metadata for this resource. The |
| 219 // browser may cache it and return it on subsequent responses to speed | 219 // browser may cache it and return it on subsequent responses to speed |
| 220 // the processing of this resource. | 220 // the processing of this resource. |
| 221 std::vector<char> copy(data, data + size); | 221 std::vector<char> copy(data, data + size); |
| 222 RenderThread::current()->Send(new ViewHostMsg_DidGenerateCacheableMetadata( | 222 RenderThread::current()->Send(new ViewHostMsg_DidGenerateCacheableMetadata( |
| 223 url, response_time, copy)); | 223 url, response_time, copy)); |
| 224 } | 224 } |
| 225 | 225 |
| 226 WebString RendererWebKitClientImpl::defaultLocale() { | 226 WebString RendererWebKitClientImpl::defaultLocale() { |
| 227 // TODO(darin): Eliminate this webkit_glue call. | 227 // TODO(darin): Eliminate this webkit_glue call. |
| 228 return WideToUTF16(webkit_glue::GetWebKitLocale()); | 228 return ASCIIToUTF16(webkit_glue::GetWebKitLocale()); |
| 229 } | 229 } |
| 230 | 230 |
| 231 void RendererWebKitClientImpl::suddenTerminationChanged(bool enabled) { | 231 void RendererWebKitClientImpl::suddenTerminationChanged(bool enabled) { |
| 232 if (enabled) { | 232 if (enabled) { |
| 233 // We should not get more enables than disables, but we want it to be a | 233 // We should not get more enables than disables, but we want it to be a |
| 234 // non-fatal error if it does happen. | 234 // non-fatal error if it does happen. |
| 235 DCHECK_GT(sudden_termination_disables_, 0); | 235 DCHECK_GT(sudden_termination_disables_, 0); |
| 236 sudden_termination_disables_ = std::max(sudden_termination_disables_ - 1, | 236 sudden_termination_disables_ = std::max(sudden_termination_disables_ - 1, |
| 237 0); | 237 0); |
| 238 if (sudden_termination_disables_ != 0) | 238 if (sudden_termination_disables_ != 0) |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 const WebKit::WebString& challenge, | 488 const WebKit::WebString& challenge, |
| 489 const WebKit::WebURL& url) { | 489 const WebKit::WebURL& url) { |
| 490 std::string signed_public_key; | 490 std::string signed_public_key; |
| 491 RenderThread::current()->Send(new ViewHostMsg_Keygen( | 491 RenderThread::current()->Send(new ViewHostMsg_Keygen( |
| 492 static_cast<uint32>(key_size_index), | 492 static_cast<uint32>(key_size_index), |
| 493 challenge.utf8(), | 493 challenge.utf8(), |
| 494 GURL(url), | 494 GURL(url), |
| 495 &signed_public_key)); | 495 &signed_public_key)); |
| 496 return WebString::fromUTF8(signed_public_key); | 496 return WebString::fromUTF8(signed_public_key); |
| 497 } | 497 } |
| OLD | NEW |