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

Unified Diff: chrome/common/bindings_policy.h

Issue 6874038: Remove the last Chrome dependencies from renderer, and enforce no more includes through DEPS. I ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/bindings_policy.h
===================================================================
--- chrome/common/bindings_policy.h (revision 81920)
+++ chrome/common/bindings_policy.h (working copy)
@@ -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__

Powered by Google App Engine
This is Rietveld 408576698