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
3 // found in the LICENSE file.
5 // A handful of resource-like constants related to the Content application.
7 #ifndef CONTENT_PUBLIC_COMMON_CONTENT_CONSTANTS_H_
8 #define CONTENT_PUBLIC_COMMON_CONTENT_CONSTANTS_H_
10 #include <stddef.h> // For size_t
12 #include "base/file_path.h"
13 #include "content/common/content_export.h"
17 // The name of the directory under BrowserContext::GetPath where the AppCache is
19 CONTENT_EXPORT
extern const FilePath::CharType kAppCacheDirname
[];
20 // The name of the directory under BrowserContext::GetPath where Pepper plugin
22 CONTENT_EXPORT
extern const FilePath::CharType kPepperDataDirname
[];
23 // The name of the directory under BrowserContext::GetPath() where renderers
24 // with a non-default storage partition keep their persistent state. This will
25 // contain a set of directories that partially mirror the directory structure
26 // of BrowserContext::GetPath().
27 CONTENT_EXPORT
extern const FilePath::CharType kStoragePartitionDirname
[];
29 // The MIME type used for the browser plugin.
30 CONTENT_EXPORT
extern const char kBrowserPluginMimeType
[];
31 // TODO(fsamuel): Remove this once upstreaming of the new browser plugin is
33 CONTENT_EXPORT
extern const char kBrowserPluginNewMimeType
[];
35 CONTENT_EXPORT
extern const size_t kMaxRendererProcessCount
;
37 // The maximum number of session history entries per tab.
38 extern const int kMaxSessionHistoryEntries
;
40 // The maximum number of characters of the document's title that we're willing
41 // to accept in the browser process.
42 extern const size_t kMaxTitleChars
;
44 // The maximum number of characters in the URL that we're willing to accept
45 // in the browser process. It is set low enough to avoid damage to the browser
46 // but high enough that a web site can abuse location.hash for a little storage.
47 // We have different values for "max accepted" and "max displayed" because
48 // a data: URI may be legitimately massive, but the full URI would kill all
49 // known operating systems if you dropped it into a UI control.
50 CONTENT_EXPORT
extern const size_t kMaxURLChars
;
51 CONTENT_EXPORT
extern const size_t kMaxURLDisplayChars
;
53 extern const char kStatsFilename
[];
54 extern const int kStatsMaxThreads
;
55 extern const int kStatsMaxCounters
;
57 // Most sequence numbers are used by a renderer when responding to a browser
58 // request for histogram data. This reserved number is used when a renderer
59 // sends an unprovoked update, such as after a page has been loaded. Using
60 // this reserved constant avoids any chance of confusion with a response having
61 // a browser-supplied sequence number.
62 CONTENT_EXPORT
extern const int kHistogramSynchronizerReservedSequenceNumber
;
64 CONTENT_EXPORT
extern const char kGpuCompositingFieldTrialName
[];
65 CONTENT_EXPORT
extern const char
66 kGpuCompositingFieldTrialForceCompositingEnabledName
[];
67 CONTENT_EXPORT
extern const char kGpuCompositingFieldTrialThreadEnabledName
[];
69 } // namespace content
71 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CONSTANTS_H_