summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-18 05:00:10 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-18 05:00:10 +0000
commit9966325b7197accb38248ebf48983bf0d06c525b (patch)
treeb33fb7ebf51ae47074e5db5c7f255ffd7c9e75f9 /chrome/common
parent9db98a2b1c29c70dc1a2a8a9d5169c7c5411297c (diff)
downloadchromium_src-9966325b7197accb38248ebf48983bf0d06c525b.zip
chromium_src-9966325b7197accb38248ebf48983bf0d06c525b.tar.gz
chromium_src-9966325b7197accb38248ebf48983bf0d06c525b.tar.bz2
Remove the last Chrome dependencies from renderer, and enforce no more includes through DEPS. I also added DEPS checking for gpu/plugin/worker directories as well. I moved the Chrome specific browser tests to the chrome directory, and removed render_widget_unittest since it didn't seem to be testing much (there are tests that test it much more fully). I had to move bindings_policy.h, which ideally would be split into separate pieces so that the content layer only has to know about the content bindings. Given that it's basically an enum, I moved the whole file now since it's used in a lot of places, and the value of turning on DEPS checking is really high.
Review URL: http://codereview.chromium.org/6874038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81924 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/bindings_policy.h43
-rw-r--r--chrome/common/chrome_constants.cc4
-rw-r--r--chrome/common/chrome_constants.h7
-rw-r--r--chrome/common/chrome_switches.cc22
-rw-r--r--chrome/common/chrome_switches.h6
-rw-r--r--chrome/common/prerender_constants.h21
-rw-r--r--chrome/common/render_messages.h63
-rw-r--r--chrome/common/url_constants.cc24
-rw-r--r--chrome/common/url_constants.h30
9 files changed, 2 insertions, 218 deletions
diff --git a/chrome/common/bindings_policy.h b/chrome/common/bindings_policy.h
deleted file mode 100644
index 7d0db25..0000000
--- a/chrome/common/bindings_policy.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_COMMON_BINDINGS_POLICY_H__
-#define CHROME_COMMON_BINDINGS_POLICY_H__
-#pragma once
-
-// This is a utility class that specifies flag values for the types of
-// JavaScript bindings exposed to renderers.
-class BindingsPolicy {
- public:
- enum {
- // HTML-based UI bindings that allows he js content to send JSON-encoded
- // data back to the browser process.
- WEB_UI = 1 << 0,
- // DOM automation bindings that allows the js content to send JSON-encoded
- // data back to automation in the parent process. (By default this isn't
- // allowed unless the app has been started up with the --dom-automation
- // switch.)
- DOM_AUTOMATION = 1 << 1,
- // Bindings that allow access to the external host (through automation).
- EXTERNAL_HOST = 1 << 2,
- // Special bindings with privileged APIs for code running in the extension
- // process.
- EXTENSION = 1 << 3,
- };
-
- static bool is_web_ui_enabled(int flags) {
- return (flags & WEB_UI) != 0;
- }
- static bool is_dom_automation_enabled(int flags) {
- return (flags & DOM_AUTOMATION) != 0;
- }
- static bool is_external_host_enabled(int flags) {
- return (flags & EXTERNAL_HOST) != 0;
- }
- static bool is_extension_enabled(int flags) {
- return (flags & EXTENSION) != 0;
- }
-};
-
-#endif // CHROME_COMMON_BINDINGS_POLICY_H__
diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc
index 0ccf500..465a1efe6 100644
--- a/chrome/common/chrome_constants.cc
+++ b/chrome/common/chrome_constants.cc
@@ -116,8 +116,6 @@ const unsigned int kMaxRendererProcessCount = 42;
const int kStatsMaxThreads = 32;
const int kStatsMaxCounters = 3000;
-const size_t kMaxTitleChars = 4 * 1024;
-
// We don't enable record mode in the released product because users could
// potentially be tricked into running a product in record mode without
// knowing it. Enable in debug builds. Playback mode is allowed always,
@@ -130,8 +128,6 @@ const bool kRecordModeEnabled = false;
const int kHistogramSynchronizerReservedSequenceNumber = 0;
-const int kMaxSessionHistoryEntries = 50;
-
const char* const kUnknownLanguageCode = "und";
const int kJavascriptMessageExpectedDelay = 1000;
diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h
index 0070a0f..4cc992d 100644
--- a/chrome/common/chrome_constants.h
+++ b/chrome/common/chrome_constants.h
@@ -74,10 +74,6 @@ extern const unsigned int kMaxRendererProcessCount;
extern const int kStatsMaxThreads;
extern const int kStatsMaxCounters;
-// The maximum number of characters of the document's title that we're willing
-// to accept in the browser process.
-extern const size_t kMaxTitleChars;
-
extern const bool kRecordModeEnabled;
// Most sequence numbers are used by a renderer when responding to a browser
@@ -87,9 +83,6 @@ extern const bool kRecordModeEnabled;
// a browser-supplied sequence number.
extern const int kHistogramSynchronizerReservedSequenceNumber;
-// The maximum number of session history entries per tab.
-extern const int kMaxSessionHistoryEntries;
-
// The language code used when the language of a page could not be detected.
// (Matches what the CLD -Compact Language Detection- library reports.)
extern const char* const kUnknownLanguageCode;
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 58410fb..dd92eb7 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -164,10 +164,6 @@ const char kDisableAltWinstation[] = "disable-winsta";
// Replaces the audio IPC layer for <audio> and <video> with a mock audio
// device, useful when using remote desktop or machines without sound cards.
// This is temporary until we fix the underlying problem.
-//
-// TODO(scherkus): remove --disable-audio when we have a proper fallback
-// mechanism.
-const char kDisableAudio[] = "disable-audio";
// Disable CNAME lookup of the host when generating the Kerberos SPN for a
// Negotiate challenge. See HttpAuthHandlerNegotiate::CreateSPN
@@ -362,9 +358,6 @@ const char kEnableAccelerated2dCanvas[] = "enable-accelerated-2d-canvas";
// Enables the hardware acceleration of plugins.
const char kEnableAcceleratedPlugins[] = "enable-accelerated-plugins";
-// Enables WebKit accessibility within the renderer process.
-const char kEnableAccessibility[] = "enable-accessibility";
-
// Enables AeroPeek for each tab. (This switch only works on Windows 7).
const char kEnableAeroPeekTabs[] = "enable-aero-peek-tabs";
@@ -469,9 +462,6 @@ const char kEnableRemoting[] = "enable-remoting";
const char kEnableResourceContentSettings[] =
"enable-resource-content-settings";
-// Enable Pepper and JavaScript P2P API.
-const char kEnableP2PApi[] = "enable-p2papi";
-
// Enable panels (always on-top docked pop-up windows).
const char kEnablePanels[] = "enable-panels";
@@ -511,14 +501,6 @@ const char kEnableTcpFastOpen[] = "enable-tcp-fastopen";
// browser window.
const char kEnableVerticalTabs[] = "enable-vertical-tabs";
-// Enables support for fullscreen video. Current implementation is
-// incomplete and this flag is used for development and testing.
-const char kEnableVideoFullscreen[] = "enable-video-fullscreen";
-
-// Enables video logging where video elements log playback performance data to
-// the debug log.
-const char kEnableVideoLogging[] = "enable-video-logging";
-
// Spawn threads to watch for excessive delays in specified message loops.
// User should set breakpoints on Alarm() to examine problematic thread.
// Usage: -enable-watchdog=[ui][io]
@@ -909,10 +891,6 @@ const char kSilentDumpOnDCHECK[] = "silent-dump-on-dcheck";
// Replaces the buffered data source for <audio> and <video> with a simplified
// resource loader that downloads the entire resource into memory.
-//
-// TODO(scherkus): remove --simple-data-source when our media resource loading
-// is cleaned up and playback testing completed.
-const char kSimpleDataSource[] = "simple-data-source";
// Start the browser maximized, regardless of any previous settings.
const char kStartMaximized[] = "start-maximized";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index e624157..8eae4b0 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -61,7 +61,6 @@ extern const char kDiagnostics[];
extern const char kDisableAcceleratedLayers[];
extern const char kDisableAcceleratedVideo[];
extern const char kDisableAltWinstation[];
-extern const char kDisableAudio[];
extern const char kDisableAuthNegotiateCnameLookup[];
extern const char kDisableBackgroundMode[];
extern const char kDisableBackgroundNetworking[];
@@ -111,7 +110,6 @@ extern const char kDomAutomationController[];
extern const char kDumpHistogramsOnExit[];
extern const char kEnableAccelerated2dCanvas[];
extern const char kEnableAcceleratedPlugins[];
-extern const char kEnableAccessibility[];
extern const char kEnableAeroPeekTabs[];
extern const char kEnableAuthNegotiatePort[];
extern const char kEnableClientSidePhishingInterstitial[];
@@ -137,7 +135,6 @@ extern const char kEnableIPPooling[];
extern const char kEnableMemoryInfo[];
extern const char kEnableNaCl[];
extern const char kEnableNaClDebug[];
-extern const char kEnableP2PApi[];
extern const char kEnablePanels[];
extern const char kEnablePreconnect[];
extern const char kEnablePrintPreview[];
@@ -154,8 +151,6 @@ extern const char kEnableTabGroupsContextMenu[];
extern const char kEnableTcpFastOpen[];
extern const char kEnableTopSites[];
extern const char kEnableVerticalTabs[];
-extern const char kEnableVideoFullscreen[];
-extern const char kEnableVideoLogging[];
extern const char kEnableWatchdog[];
extern const char kExperimentalSpellcheckerFeatures[];
extern const char kExplicitlyAllowedPorts[];
@@ -249,7 +244,6 @@ extern const char kShowCompositedLayerTree[];
extern const char kShowFPSCounter[];
extern const char kShowIcons[];
extern const char kSilentDumpOnDCHECK[];
-extern const char kSimpleDataSource[];
extern const char kStartMaximized[];
extern const char kSyncAllowInsecureXmppConnection[];
extern const char kSyncInvalidateXmppLogin[];
diff --git a/chrome/common/prerender_constants.h b/chrome/common/prerender_constants.h
deleted file mode 100644
index 7712ea0..0000000
--- a/chrome/common/prerender_constants.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Constants related to the prerendering feature in chrome.
-
-#ifndef CHROME_COMMON_PRERENDER_CONSTANTS_H_
-#define CHROME_COMMON_PRERENDER_CONSTANTS_H_
-#pragma once
-
-namespace prerender {
-
-enum PrerenderCancellationReason {
- PRERENDER_CANCELLATION_REASON_FIRST_UNUSED,
- PRERENDER_CANCELLATION_REASON_HTML5_MEDIA,
- PRERENDER_CANCELLATION_REASON_LAST_UNUSED,
-};
-
-} // namespace prerender
-
-#endif // CHROME_COMMON_PRERENDER_CONSTANTS_H_
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index f1ee889..510a8f1 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -21,7 +21,6 @@
#include "chrome/common/icon_messages.h"
#include "chrome/common/instant_types.h"
#include "chrome/common/nacl_types.h"
-#include "chrome/common/prerender_constants.h"
#include "chrome/common/search_provider.h"
#include "chrome/common/thumbnail_score.h"
#include "chrome/common/translate_errors.h"
@@ -37,15 +36,6 @@
#ifndef CHROME_COMMON_RENDER_MESSAGES_H_
#define CHROME_COMMON_RENDER_MESSAGES_H_
-// Values that may be OR'd together to form the 'flags' parameter of the
-// ViewMsg_EnablePreferredSizeChangedMode message.
-enum ViewHostMsg_EnablePreferredSizeChangedMode_Flags {
- kPreferredSizeNothing,
- kPreferredSizeWidth = 1 << 0,
- // Requesting the height currently requires a polling loop in render_view.cc.
- kPreferredSizeHeightThisIsSlow = 1 << 1,
-};
-
// Command values for the cmd parameter of the
// ViewHost_JavaScriptStressTestControl message. For each command the parameter
// passed has a different meaning:
@@ -100,7 +90,6 @@ struct ParamTraits<ContentSettings> {
#define IPC_MESSAGE_START ChromeMsgStart
IPC_ENUM_TRAITS(InstantCompleteBehavior)
-IPC_ENUM_TRAITS(prerender::PrerenderCancellationReason)
IPC_ENUM_TRAITS(search_provider::OSDDType)
IPC_ENUM_TRAITS(search_provider::InstallState)
IPC_ENUM_TRAITS(TranslateErrors::Type)
@@ -187,15 +176,9 @@ IPC_MESSAGE_CONTROL2(ViewMsg_SetContentSettingsForCurrentURL,
GURL /* url */,
ContentSettings /* content_settings */)
-// Install the first missing pluign.
-IPC_MESSAGE_ROUTED0(ViewMsg_InstallMissingPlugin)
-
// Tells the render view to load all blocked plugins.
IPC_MESSAGE_ROUTED0(ViewMsg_LoadBlockedPlugins)
-// Tells the render view a prerendered page is about to be displayed.
-IPC_MESSAGE_ROUTED0(ViewMsg_DisplayPrerenderedPage)
-
// Used to instruct the RenderView to go into "view source" mode.
IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode)
@@ -242,18 +225,6 @@ IPC_MESSAGE_ROUTED3(ViewMsg_HandleMessageFromExternalHost,
std::string /* The origin */,
std::string /* The target*/)
-// Sent to the renderer when a popup window should no longer count against
-// the current popup count (either because it's not a popup or because it was
-// a generated by a user action or because a constrained popup got turned
-// into a full window).
-IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount)
-
-// Sent by the Browser process to alert a window about whether a it should
-// allow a scripted window.close(). The renderer assumes every new window is a
-// blocked popup until notified otherwise.
-IPC_MESSAGE_ROUTED1(ViewMsg_AllowScriptToClose,
- bool /* script_can_close */)
-
IPC_MESSAGE_ROUTED4(ViewMsg_SearchBoxChange,
string16 /* value */,
bool /* verbatim */,
@@ -379,11 +350,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetSearchProviderInstallState,
GURL /* inquiry url */,
search_provider::InstallState /* install */)
-// Stores new inspector setting in the profile.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateInspectorSetting,
- std::string, /* key */
- std::string /* value */)
-
// Send back a string to be recorded by UserMetrics.
IPC_MESSAGE_CONTROL1(ViewHostMsg_UserMetricsRecordAction,
std::string /* action */)
@@ -410,10 +376,6 @@ IPC_MESSAGE_CONTROL2(ViewHostMsg_V8HeapStats,
IPC_MESSAGE_CONTROL1(ViewHostMsg_DnsPrefetch,
std::vector<std::string> /* hostnames */)
-// Notifies when default plugin updates status of the missing plugin.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_MissingPluginStatus,
- int /* status */)
-
// Requests the outdated plugins policy.
// |policy| is one of ALLOW, BLOCK or ASK. Anything else is an error.
// ALLOW means that outdated plugins are allowed, and BLOCK that they should
@@ -427,9 +389,6 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_BlockedOutdatedPlugin,
string16, /* name */
GURL /* update_url */)
-// Displays a JavaScript out-of-memory message in the infobar.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_JSOutOfMemory)
-
IPC_MESSAGE_ROUTED3(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
std::vector<GURL> /* all savable resource links */,
std::vector<GURL> /* all referrers of resource links */,
@@ -472,12 +431,6 @@ IPC_MESSAGE_ROUTED4(ViewHostMsg_PageTranslated,
std::string /* the translated language */,
TranslateErrors::Type /* the error type if available */)
-// Message sent from the renderer to the browser to notify it of events which
-// may lead to the cancellation of a prerender. The message is sent only when
-// the renderer is in prerender mode.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_MaybeCancelPrerender,
- prerender::PrerenderCancellationReason)
-
// Suggest results -----------------------------------------------------------
IPC_MESSAGE_ROUTED3(ViewHostMsg_SetSuggestions,
@@ -489,16 +442,6 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_InstantSupportDetermined,
int32 /* page_id */,
bool /* result */)
-// Updates the content restrictions, i.e. to disable print/copy.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateContentRestrictions,
- int /* restrictions */)
-
-// The currently displayed PDF has an unsupported feature.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_PDFHasUnsupportedFeature)
-
-// Brings up SaveAs... dialog (similar to the wrench->SaveAs...).
-IPC_MESSAGE_ROUTED0(ViewHostMsg_SaveAs)
-
// JavaScript related messages -----------------------------------------------
// Notify the JavaScript engine in the render to change its parameters
@@ -506,9 +449,3 @@ IPC_MESSAGE_ROUTED0(ViewHostMsg_SaveAs)
IPC_MESSAGE_ROUTED2(ViewMsg_JavaScriptStressTestControl,
int /* cmd */,
int /* param */)
-
-// Register a new handler for URL requests with the given scheme.
-IPC_MESSAGE_ROUTED3(ViewHostMsg_RegisterProtocolHandler,
- std::string /* scheme */,
- GURL /* url */,
- string16 /* title */)
diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc
index 9fa04de..bfb3254 100644
--- a/chrome/common/url_constants.cc
+++ b/chrome/common/url_constants.cc
@@ -9,30 +9,10 @@
namespace chrome {
-const char kAboutScheme[] = "about";
-const char kBlobScheme[] = "blob";
-const char kChromeDevToolsScheme[] = "chrome-devtools";
-const char kChromeInternalScheme[] = "chrome-internal";
-const char kChromeUIScheme[] = "chrome";
-const char kDataScheme[] = "data";
-const char kExtensionScheme[] = "chrome-extension";
-const char kFileScheme[] = "file";
-const char kFileSystemScheme[] = "filesystem";
-const char kFtpScheme[] = "ftp";
-const char kHttpScheme[] = "http";
-const char kHttpsScheme[] = "https";
-const char kJavaScriptScheme[] = "javascript";
-const char kMailToScheme[] = "mailto";
-const char kMetadataScheme[] = "metadata";
-const char kUserScriptScheme[] = "chrome-user-script";
-const char kViewSourceScheme[] = "view-source";
-
#if defined(OS_CHROMEOS)
const char kCrosScheme[] = "cros";
#endif
-const char kStandardSchemeSeparator[] = "://";
-
const char* kSavableSchemes[] = {
kHttpScheme,
kHttpsScheme,
@@ -46,10 +26,8 @@ const char* kSavableSchemes[] = {
const char kAboutAboutURL[] = "about:about";
const char kAboutAppCacheInternalsURL[] = "about:appcache-internals";
-const char kAboutBlankURL[] = "about:blank";
const char kAboutCacheURL[] = "about:cache";
const char kAboutConflicts[] = "about:conflicts";
-const char kAboutCrashURL[] = "about:crash";
const char kAboutKillURL[] = "about:kill";
const char kAboutCreditsURL[] = "about:credits";
const char kAboutDNSURL[] = "about:dns";
@@ -180,8 +158,6 @@ const char kChromeUILoginContainerHost[] = "login-container";
const char kChromeUILoginHost[] = "login";
#endif
-const char kUnreachableWebDataURL[] = "chrome://chromewebdata/";
-
const char kAppCacheViewInternalsURL[] = "chrome://appcache-internals/";
const char kBlobViewInternalsURL[] = "chrome://blob-internals/";
diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h
index 80bee61..db4bfbe 100644
--- a/chrome/common/url_constants.h
+++ b/chrome/common/url_constants.h
@@ -8,30 +8,9 @@
#define CHROME_COMMON_URL_CONSTANTS_H_
#pragma once
-namespace chrome {
+#include "content/common/url_constants.h"
-// Canonical schemes you can use as input to GURL.SchemeIs().
-extern const char kAboutScheme[];
-extern const char kBlobScheme[];
-extern const char kChromeDevToolsScheme[];
-extern const char kChromeInternalScheme[];
-extern const char kChromeUIScheme[]; // The scheme used for WebUIs.
-extern const char kCrosScheme[]; // The scheme used for ChromeOS.
-extern const char kDataScheme[];
-extern const char kExtensionScheme[];
-extern const char kFileScheme[];
-extern const char kFileSystemScheme[];
-extern const char kFtpScheme[];
-extern const char kHttpScheme[];
-extern const char kHttpsScheme[];
-extern const char kJavaScriptScheme[];
-extern const char kMailToScheme[];
-extern const char kMetadataScheme[];
-extern const char kUserScriptScheme[];
-extern const char kViewSourceScheme[];
-
-// Used to separate a standard scheme and the hostname: "://".
-extern const char kStandardSchemeSeparator[];
+namespace chrome {
// Null terminated list of schemes that are savable.
extern const char* kSavableSchemes[];
@@ -39,11 +18,9 @@ extern const char* kSavableSchemes[];
// About URLs (including schemes).
extern const char kAboutAboutURL[];
extern const char kAboutAppCacheInternalsURL[];
-extern const char kAboutBlankURL[];
extern const char kAboutBrowserCrash[];
extern const char kAboutConflicts[];
extern const char kAboutCacheURL[];
-extern const char kAboutCrashURL[];
extern const char kAboutKillURL[];
extern const char kAboutCreditsURL[];
extern const char kAboutDNSURL[];
@@ -170,9 +147,6 @@ extern const char kChromeUILoginContainerHost[];
extern const char kChromeUILoginHost[];
#endif
-// Special URL used to start a navigation to an error page.
-extern const char kUnreachableWebDataURL[];
-
// AppCache related URL.
extern const char kAppCacheViewInternalsURL[];