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 #ifndef WEBKIT_GLUE_WEBKIT_GLUE_H_ | 5 #ifndef WEBKIT_GLUE_WEBKIT_GLUE_H_ |
6 #define WEBKIT_GLUE_WEBKIT_GLUE_H_ | 6 #define WEBKIT_GLUE_WEBKIT_GLUE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 28 matching lines...) Expand all Loading... | |
39 } | 39 } |
40 | 40 |
41 namespace webkit { | 41 namespace webkit { |
42 namespace npapi { | 42 namespace npapi { |
43 struct WebPluginInfo; | 43 struct WebPluginInfo; |
44 } | 44 } |
45 } | 45 } |
46 | 46 |
47 namespace webkit_glue { | 47 namespace webkit_glue { |
48 | 48 |
49 // Chromium sets the minimum interval timeout to 4ms, overriding the | |
50 // default of 10ms. We'd like to go lower, however there are poorly | |
51 // coded websites out there which do create CPU-spinning loops. Using | |
52 // 4ms prevents the CPU from spinning too busily and provides a balance | |
53 // between CPU spinning and the smallest possible interval timer. | |
54 const double kForegroundTabTimerInterval = 0.004; | |
darin (slow to review)
2011/02/17 06:42:32
i'm tempted to pull these constants out of webkit_
Ken Russell (switch to Gerrit)
2011/02/18 01:05:54
Sure, good idea. Done.
| |
55 | |
56 // Provides control over the minimum timer interval for background tabs. | |
57 const double kBackgroundTabTimerInterval = 0.004; | |
49 | 58 |
50 //---- BEGIN FUNCTIONS IMPLEMENTED BY WEBKIT/GLUE ----------------------------- | 59 //---- BEGIN FUNCTIONS IMPLEMENTED BY WEBKIT/GLUE ----------------------------- |
51 | 60 |
52 void SetJavaScriptFlags(const std::string& flags); | 61 void SetJavaScriptFlags(const std::string& flags); |
53 | 62 |
54 // Turn on logging for flags in the provided comma delimited list. | 63 // Turn on logging for flags in the provided comma delimited list. |
55 void EnableWebCoreLogChannels(const std::string& channels); | 64 void EnableWebCoreLogChannels(const std::string& channels); |
56 | 65 |
57 // Returns the text of the document element. | 66 // Returns the text of the document element. |
58 string16 DumpDocumentText(WebKit::WebFrame* web_frame); | 67 string16 DumpDocumentText(WebKit::WebFrame* web_frame); |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
306 bool GetFontTable(int fd, uint32_t table, uint8_t* output, | 315 bool GetFontTable(int fd, uint32_t table, uint8_t* output, |
307 size_t* output_length); | 316 size_t* output_length); |
308 #endif | 317 #endif |
309 | 318 |
310 // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- | 319 // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- |
311 | 320 |
312 | 321 |
313 } // namespace webkit_glue | 322 } // namespace webkit_glue |
314 | 323 |
315 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ | 324 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ |
OLD | NEW |