Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: webkit/glue/webkit_glue.h

Issue 6532012: Set the minimum timer interval on a per-page basis, and adjust it when... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698