| 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" |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/file_path.h" | 14 #include "base/file_path.h" |
| 15 #include "base/platform_file.h" | 15 #include "base/platform_file.h" |
| 16 #include "base/shared_memory.h" | 16 #include "base/shared_memory.h" |
| 17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
| 18 #include "chrome/common/database_util.h" | 18 #include "chrome/common/database_util.h" |
| 19 #include "chrome/common/render_messages.h" | 19 #include "chrome/common/render_messages.h" |
| 20 #include "chrome/common/webmessageportchannel_impl.h" | 20 #include "chrome/common/webmessageportchannel_impl.h" |
| 21 #include "chrome/plugin/npobject_util.h" | 21 #include "chrome/plugin/npobject_util.h" |
| 22 #include "chrome/renderer/net/render_dns_master.h" | 22 #include "chrome/renderer/net/renderer_net_predictor.h" |
| 23 #include "chrome/renderer/render_thread.h" | 23 #include "chrome/renderer/render_thread.h" |
| 24 #include "chrome/renderer/render_view.h" | 24 #include "chrome/renderer/render_view.h" |
| 25 #include "chrome/renderer/renderer_webindexeddatabase_impl.h" | 25 #include "chrome/renderer/renderer_webindexeddatabase_impl.h" |
| 26 #include "chrome/renderer/renderer_webstoragenamespace_impl.h" | 26 #include "chrome/renderer/renderer_webstoragenamespace_impl.h" |
| 27 #include "chrome/renderer/visitedlink_slave.h" | 27 #include "chrome/renderer/visitedlink_slave.h" |
| 28 #include "chrome/renderer/webgles2context_impl.h" | 28 #include "chrome/renderer/webgles2context_impl.h" |
| 29 #include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h" | 29 #include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h" |
| 30 #include "googleurl/src/gurl.h" | 30 #include "googleurl/src/gurl.h" |
| 31 #include "ipc/ipc_sync_message_filter.h" | 31 #include "ipc/ipc_sync_message_filter.h" |
| 32 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 32 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 WebString RendererWebKitClientImpl::defaultLocale() { | 166 WebString RendererWebKitClientImpl::defaultLocale() { |
| 167 // TODO(darin): Eliminate this webkit_glue call. | 167 // TODO(darin): Eliminate this webkit_glue call. |
| 168 return WideToUTF16(webkit_glue::GetWebKitLocale()); | 168 return WideToUTF16(webkit_glue::GetWebKitLocale()); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void RendererWebKitClientImpl::suddenTerminationChanged(bool enabled) { | 171 void RendererWebKitClientImpl::suddenTerminationChanged(bool enabled) { |
| 172 if (enabled) { | 172 if (enabled) { |
| 173 // We should not get more enables than disables, but we want it to be a | 173 // We should not get more enables than disables, but we want it to be a |
| 174 // non-fatal error if it does happen. | 174 // non-fatal error if it does happen. |
| 175 DCHECK_GT(sudden_termination_disables_, 0); | 175 DCHECK_GT(sudden_termination_disables_, 0); |
| 176 sudden_termination_disables_ = std::max(sudden_termination_disables_ - 1, 0)
; | 176 sudden_termination_disables_ = std::max(sudden_termination_disables_ - 1, |
| 177 0); |
| 177 if (sudden_termination_disables_ != 0) | 178 if (sudden_termination_disables_ != 0) |
| 178 return; | 179 return; |
| 179 } else { | 180 } else { |
| 180 sudden_termination_disables_++; | 181 sudden_termination_disables_++; |
| 181 if (sudden_termination_disables_ != 1) | 182 if (sudden_termination_disables_ != 1) |
| 182 return; | 183 return; |
| 183 } | 184 } |
| 184 | 185 |
| 185 RenderThread* thread = RenderThread::current(); | 186 RenderThread* thread = RenderThread::current(); |
| 186 if (thread) // NULL in unittests. | 187 if (thread) // NULL in unittests. |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 const WebKit::WebString& challenge, | 428 const WebKit::WebString& challenge, |
| 428 const WebKit::WebURL& url) { | 429 const WebKit::WebURL& url) { |
| 429 std::string signed_public_key; | 430 std::string signed_public_key; |
| 430 RenderThread::current()->Send(new ViewHostMsg_Keygen( | 431 RenderThread::current()->Send(new ViewHostMsg_Keygen( |
| 431 static_cast<uint32>(key_size_index), | 432 static_cast<uint32>(key_size_index), |
| 432 challenge.utf8(), | 433 challenge.utf8(), |
| 433 GURL(url), | 434 GURL(url), |
| 434 &signed_public_key)); | 435 &signed_public_key)); |
| 435 return WebString::fromUTF8(signed_public_key); | 436 return WebString::fromUTF8(signed_public_key); |
| 436 } | 437 } |
| OLD | NEW |