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 <mlang.h> | 8 #include <mlang.h> |
9 #include <objidl.h> | 9 #include <objidl.h> |
10 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 10 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 | 82 |
83 //------------------------------------------------------------------------------ | 83 //------------------------------------------------------------------------------ |
84 // webkit_glue impl: | 84 // webkit_glue impl: |
85 | 85 |
86 namespace webkit_glue { | 86 namespace webkit_glue { |
87 | 87 |
88 // Global variable used by the plugin quirk "die after unload". | 88 // Global variable used by the plugin quirk "die after unload". |
89 bool g_forcefully_terminate_plugin_process = false; | 89 bool g_forcefully_terminate_plugin_process = false; |
90 | 90 |
91 void SetJavaScriptFlags(const std::string& str) { | 91 void SetJavaScriptFlags(const std::string& str) { |
92 #if WEBKIT_USING_V8 | |
tony
2013/03/12 16:58:51
Can we remove the definition of this macro from th
abarth-chromium
2013/03/12 17:30:52
Yes: https://bugs.webkit.org/show_bug.cgi?id=11212
| |
93 v8::V8::SetFlagsFromString(str.data(), static_cast<int>(str.size())); | 92 v8::V8::SetFlagsFromString(str.data(), static_cast<int>(str.size())); |
94 #endif | |
95 } | 93 } |
96 | 94 |
97 void EnableWebCoreLogChannels(const std::string& channels) { | 95 void EnableWebCoreLogChannels(const std::string& channels) { |
98 if (channels.empty()) | 96 if (channels.empty()) |
99 return; | 97 return; |
100 base::StringTokenizer t(channels, ", "); | 98 base::StringTokenizer t(channels, ", "); |
101 while (t.GetNext()) { | 99 while (t.GetNext()) { |
102 WebKit::enableLogChannel(t.token().c_str()); | 100 WebKit::enableLogChannel(t.token().c_str()); |
103 } | 101 } |
104 } | 102 } |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
372 base::GetCurrentProcessHandle())); | 370 base::GetCurrentProcessHandle())); |
373 return process_metrics->GetPagefileUsage() >> 10; | 371 return process_metrics->GetPagefileUsage() >> 10; |
374 } | 372 } |
375 #endif | 373 #endif |
376 | 374 |
377 double ZoomFactorToZoomLevel(double factor) { | 375 double ZoomFactorToZoomLevel(double factor) { |
378 return WebView::zoomFactorToZoomLevel(factor); | 376 return WebView::zoomFactorToZoomLevel(factor); |
379 } | 377 } |
380 | 378 |
381 } // namespace webkit_glue | 379 } // namespace webkit_glue |
OLD | NEW |