OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_SET_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_SET_H_ |
6 #define CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_SET_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_SET_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // Calls chromeHidden.<methodName> in each context for <extension_id>. If | 62 // Calls chromeHidden.<methodName> in each context for <extension_id>. If |
63 // render_view is non-NULL, only call the function in contexts belonging to | 63 // render_view is non-NULL, only call the function in contexts belonging to |
64 // that view. The called javascript function should not return a value other | 64 // that view. The called javascript function should not return a value other |
65 // than v8::Undefined(). A DCHECK is setup to break if it is otherwise. | 65 // than v8::Undefined(). A DCHECK is setup to break if it is otherwise. |
66 void DispatchChromeHiddenMethod(const std::string& extension_id, | 66 void DispatchChromeHiddenMethod(const std::string& extension_id, |
67 const std::string& method_name, | 67 const std::string& method_name, |
68 const base::ListValue& arguments, | 68 const base::ListValue& arguments, |
69 content::RenderView* render_view, | 69 content::RenderView* render_view, |
70 const GURL& event_url) const; | 70 const GURL& event_url) const; |
71 | 71 |
| 72 // Cleans up contexts belonging to an unloaded extension. |
| 73 void OnExtensionUnloaded(const std::string& extension_id); |
| 74 |
72 private: | 75 private: |
73 ContextSet contexts_; | 76 ContextSet contexts_; |
74 | 77 |
75 DISALLOW_COPY_AND_ASSIGN(ChromeV8ContextSet); | 78 DISALLOW_COPY_AND_ASSIGN(ChromeV8ContextSet); |
76 }; | 79 }; |
77 | 80 |
78 } // namespace extensions | 81 } // namespace extensions |
79 | 82 |
80 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_SET_H_ | 83 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_SET_H_ |
OLD | NEW |