OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/renderer/extensions/extension_process_bindings.h" | 5 #include "chrome/renderer/extensions/extension_process_bindings.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // TODO(erikkay) It might be nice if for consistency we could merge these with | 75 // TODO(erikkay) It might be nice if for consistency we could merge these with |
76 // the permissions list, or at least have them in one place. | 76 // the permissions list, or at least have them in one place. |
77 const char* kNonPermissionExtensionPackages[] = { | 77 const char* kNonPermissionExtensionPackages[] = { |
78 "extension", | 78 "extension", |
79 // TODO(erikkay): We're inconsistent about the the package name in the events | 79 // TODO(erikkay): We're inconsistent about the the package name in the events |
80 // for pageAction and browserAction. | 80 // for pageAction and browserAction. |
81 "pageAction", | 81 "pageAction", |
82 "pageActions", | 82 "pageActions", |
83 "browserAction", | 83 "browserAction", |
84 "browserActions", | 84 "browserActions", |
85 "contextMenus", // TODO(asargent) remove when the permission is added | |
86 "i18n", | 85 "i18n", |
87 "devtools", | 86 "devtools", |
88 "test" | 87 "test" |
89 }; | 88 }; |
90 | 89 |
91 struct SingletonData { | 90 struct SingletonData { |
92 std::set<std::string> function_names_; | 91 std::set<std::string> function_names_; |
93 PageActionIdMap page_action_ids_; | 92 PageActionIdMap page_action_ids_; |
94 ExtensionPermissionsMap permissions_; | 93 ExtensionPermissionsMap permissions_; |
95 IncognitoEnabledMap incognito_enabled_map_; | 94 IncognitoEnabledMap incognito_enabled_map_; |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 return; | 721 return; |
723 | 722 |
724 v8::HandleScope handle_scope; | 723 v8::HandleScope handle_scope; |
725 WebFrame* frame = view->mainFrame(); | 724 WebFrame* frame = view->mainFrame(); |
726 v8::Local<v8::Context> context = frame->mainWorldScriptContext(); | 725 v8::Local<v8::Context> context = frame->mainWorldScriptContext(); |
727 v8::Handle<v8::Value> argv[1]; | 726 v8::Handle<v8::Value> argv[1]; |
728 argv[0] = v8::String::New(type_str); | 727 argv[0] = v8::String::New(type_str); |
729 bindings_utils::CallFunctionInContext(context, "setViewType", | 728 bindings_utils::CallFunctionInContext(context, "setViewType", |
730 arraysize(argv), argv); | 729 arraysize(argv), argv); |
731 } | 730 } |
OLD | NEW |