content_constants.h revision 7dbb3d5cf0c15f500944d211057644d6a2f37371
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. 4 5// A handful of resource-like constants related to the Content application. 6 7#ifndef CONTENT_PUBLIC_COMMON_CONTENT_CONSTANTS_H_ 8#define CONTENT_PUBLIC_COMMON_CONTENT_CONSTANTS_H_ 9 10#include <stddef.h> // For size_t 11 12#include "base/files/file_path.h" 13#include "content/common/content_export.h" 14 15namespace content { 16 17// The name of the directory under BrowserContext::GetPath where the AppCache is 18// put. 19CONTENT_EXPORT extern const base::FilePath::CharType kAppCacheDirname[]; 20// The name of the directory under BrowserContext::GetPath where Pepper plugin 21// data is put. 22CONTENT_EXPORT extern const base::FilePath::CharType kPepperDataDirname[]; 23 24// The MIME type used for the browser plugin. 25CONTENT_EXPORT extern const char kBrowserPluginMimeType[]; 26 27CONTENT_EXPORT extern const size_t kMaxRendererProcessCount; 28 29// The maximum number of session history entries per tab. 30extern const int kMaxSessionHistoryEntries; 31 32// The maximum number of characters of the document's title that we're willing 33// to accept in the browser process. 34extern const size_t kMaxTitleChars; 35 36// The maximum number of characters in the URL that we're willing to accept 37// in the browser process. It is set low enough to avoid damage to the browser 38// but high enough that a web site can abuse location.hash for a little storage. 39// We have different values for "max accepted" and "max displayed" because 40// a data: URI may be legitimately massive, but the full URI would kill all 41// known operating systems if you dropped it into a UI control. 42CONTENT_EXPORT extern const size_t kMaxURLChars; 43CONTENT_EXPORT extern const size_t kMaxURLDisplayChars; 44 45extern const char kStatsFilename[]; 46extern const int kStatsMaxThreads; 47extern const int kStatsMaxCounters; 48 49// Most sequence numbers are used by a renderer when responding to a browser 50// request for histogram data. This reserved number is used when a renderer 51// sends an unprovoked update, such as after a page has been loaded. Using 52// this reserved constant avoids any chance of confusion with a response having 53// a browser-supplied sequence number. 54CONTENT_EXPORT extern const int kHistogramSynchronizerReservedSequenceNumber; 55 56CONTENT_EXPORT extern const char kGpuCompositingFieldTrialName[]; 57CONTENT_EXPORT extern const char 58 kGpuCompositingFieldTrialForceCompositingEnabledName[]; 59CONTENT_EXPORT extern const char kGpuCompositingFieldTrialThreadEnabledName[]; 60 61// Shared constants for the low latency flash audio field trial. 62CONTENT_EXPORT extern const char kLowLatencyFlashAudioFieldTrialName[]; 63CONTENT_EXPORT extern const char kLowLatencyFlashAudioFieldTrialEnabledName[]; 64 65} // namespace content 66 67#endif // CONTENT_PUBLIC_COMMON_CONTENT_CONSTANTS_H_ 68