| 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 #include <map> | 5 #include <map> |
| 6 #include <set> | 6 #include <set> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "chrome/renderer/extensions/extension_process_bindings.h" | 10 #include "chrome/renderer/extensions/extension_process_bindings.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 using bindings_utils::GetStringResource; | 31 using bindings_utils::GetStringResource; |
| 32 using bindings_utils::ContextInfo; | 32 using bindings_utils::ContextInfo; |
| 33 using bindings_utils::ContextList; | 33 using bindings_utils::ContextList; |
| 34 using bindings_utils::GetContexts; | 34 using bindings_utils::GetContexts; |
| 35 using bindings_utils::GetPendingRequestMap; | 35 using bindings_utils::GetPendingRequestMap; |
| 36 using bindings_utils::PendingRequest; | 36 using bindings_utils::PendingRequest; |
| 37 using bindings_utils::PendingRequestMap; | 37 using bindings_utils::PendingRequestMap; |
| 38 using bindings_utils::ExtensionBase; | 38 using bindings_utils::ExtensionBase; |
| 39 using WebKit::WebFrame; | 39 using WebKit::WebFrame; |
| 40 using WebKit::WebView; |
| 40 | 41 |
| 41 namespace { | 42 namespace { |
| 42 | 43 |
| 43 // A map of extension ID to vector of page action ids. | 44 // A map of extension ID to vector of page action ids. |
| 44 typedef std::map< std::string, std::vector<std::string> > PageActionIdMap; | 45 typedef std::map< std::string, std::vector<std::string> > PageActionIdMap; |
| 45 | 46 |
| 46 // A map of permission name to whether its enabled for this extension. | 47 // A map of permission name to whether its enabled for this extension. |
| 47 typedef std::map<std::string, bool> PermissionsMap; | 48 typedef std::map<std::string, bool> PermissionsMap; |
| 48 | 49 |
| 49 // A map of extension ID to permissions map. | 50 // A map of extension ID to permissions map. |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 return; | 604 return; |
| 604 | 605 |
| 605 v8::HandleScope handle_scope; | 606 v8::HandleScope handle_scope; |
| 606 WebFrame* frame = view->mainFrame(); | 607 WebFrame* frame = view->mainFrame(); |
| 607 v8::Local<v8::Context> context = frame->mainWorldScriptContext(); | 608 v8::Local<v8::Context> context = frame->mainWorldScriptContext(); |
| 608 v8::Handle<v8::Value> argv[1]; | 609 v8::Handle<v8::Value> argv[1]; |
| 609 argv[0] = v8::String::New(type_str); | 610 argv[0] = v8::String::New(type_str); |
| 610 bindings_utils::CallFunctionInContext(context, "setViewType", | 611 bindings_utils::CallFunctionInContext(context, "setViewType", |
| 611 arraysize(argv), argv); | 612 arraysize(argv), argv); |
| 612 } | 613 } |
| OLD | NEW |