| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // Exposes extension APIs into the extension process. | 5 // Exposes extension APIs into the extension process. |
| 6 | 6 |
| 7 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ | 7 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ |
| 8 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ | 8 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // function name (e.g. "tabs.create") or an event name (e.g. "contextMenus/id" | 64 // function name (e.g. "tabs.create") or an event name (e.g. "contextMenus/id" |
| 65 // or "devtools.tabid.name"). | 65 // or "devtools.tabid.name"). |
| 66 // TODO(erikkay) We should standardize the naming scheme for our events. | 66 // TODO(erikkay) We should standardize the naming scheme for our events. |
| 67 static bool HasPermission(const std::string& extension_id, | 67 static bool HasPermission(const std::string& extension_id, |
| 68 const std::string& permission); | 68 const std::string& permission); |
| 69 | 69 |
| 70 // Throw a V8 exception indicating that permission to access function_name was | 70 // Throw a V8 exception indicating that permission to access function_name was |
| 71 // denied. Must be called with a valid V8 context in scope. | 71 // denied. Must be called with a valid V8 context in scope. |
| 72 static v8::Handle<v8::Value> ThrowPermissionDeniedException( | 72 static v8::Handle<v8::Value> ThrowPermissionDeniedException( |
| 73 const std::string& function_name); | 73 const std::string& function_name); |
| 74 | |
| 75 // For EXTENSION_* |type| values, adds/replaces a special class name on to | |
| 76 // the document element (e.g. "extension_toolstrip", "extension_mole") so | |
| 77 // that the page can use CSS rules to control its display appropriately. | |
| 78 static void SetViewType(WebKit::WebView* view, ViewType::Type type); | |
| 79 }; | 74 }; |
| 80 | 75 |
| 81 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ | 76 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ |
| OLD | NEW |