| 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 "webkit/glue/webkit_glue.h" | 5 #include "webkit/glue/webkit_glue.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <objidl.h> | 8 #include <objidl.h> |
| 9 #include <mlang.h> | 9 #include <mlang.h> |
| 10 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 10 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 // Global variable used by the plugin quirk "die after unload". | 79 // Global variable used by the plugin quirk "die after unload". |
| 80 bool g_forcefully_terminate_plugin_process = false; | 80 bool g_forcefully_terminate_plugin_process = false; |
| 81 | 81 |
| 82 void SetJavaScriptFlags(const std::string& str) { | 82 void SetJavaScriptFlags(const std::string& str) { |
| 83 #if WEBKIT_USING_V8 | 83 #if WEBKIT_USING_V8 |
| 84 v8::V8::SetFlagsFromString(str.data(), static_cast<int>(str.size())); | 84 v8::V8::SetFlagsFromString(str.data(), static_cast<int>(str.size())); |
| 85 #endif | 85 #endif |
| 86 } | 86 } |
| 87 | 87 |
| 88 void SetDartFlags(const std::string& str) { | |
| 89 #if WEBKIT_USING_DART | |
| 90 WebKit::setDartFlags(str.data(), static_cast<int>(str.size())); | |
| 91 #endif | |
| 92 } | |
| 93 | |
| 94 void EnableWebCoreLogChannels(const std::string& channels) { | 88 void EnableWebCoreLogChannels(const std::string& channels) { |
| 95 if (channels.empty()) | 89 if (channels.empty()) |
| 96 return; | 90 return; |
| 97 StringTokenizer t(channels, ", "); | 91 StringTokenizer t(channels, ", "); |
| 98 while (t.GetNext()) { | 92 while (t.GetNext()) { |
| 99 WebKit::enableLogChannel(t.token().c_str()); | 93 WebKit::enableLogChannel(t.token().c_str()); |
| 100 } | 94 } |
| 101 } | 95 } |
| 102 | 96 |
| 103 string16 DumpDocumentText(WebFrame* web_frame) { | 97 string16 DumpDocumentText(WebFrame* web_frame) { |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 std::string GetInspectorProtocolVersion() { | 492 std::string GetInspectorProtocolVersion() { |
| 499 return WebDevToolsAgent::inspectorProtocolVersion().utf8(); | 493 return WebDevToolsAgent::inspectorProtocolVersion().utf8(); |
| 500 } | 494 } |
| 501 | 495 |
| 502 bool IsInspectorProtocolVersionSupported(const std::string& version) { | 496 bool IsInspectorProtocolVersionSupported(const std::string& version) { |
| 503 return WebDevToolsAgent::supportsInspectorProtocolVersion( | 497 return WebDevToolsAgent::supportsInspectorProtocolVersion( |
| 504 WebString::fromUTF8(version)); | 498 WebString::fromUTF8(version)); |
| 505 } | 499 } |
| 506 | 500 |
| 507 } // namespace webkit_glue | 501 } // namespace webkit_glue |
| OLD | NEW |