OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "v8/include/v8.h" | 12 #include "v8/include/v8.h" |
13 | 13 |
14 class ChromeV8Context; | |
15 class GURL; | 14 class GURL; |
16 | 15 |
17 namespace base { | 16 namespace base { |
18 class ListValue; | 17 class ListValue; |
19 } | 18 } |
20 | 19 |
21 namespace content { | 20 namespace content { |
22 class RenderView; | 21 class RenderView; |
23 } | 22 } |
24 | 23 |
25 namespace v8 { | 24 namespace v8 { |
26 class Context; | 25 class Context; |
27 } | 26 } |
28 | 27 |
| 28 namespace extensions { |
| 29 class ChromeV8Context; |
| 30 |
29 // A container of ExtensionBindingsContext. Since calling JavaScript within a | 31 // A container of ExtensionBindingsContext. Since calling JavaScript within a |
30 // context can cause any number of contexts to be created or destroyed, this | 32 // context can cause any number of contexts to be created or destroyed, this |
31 // has additional smarts to help with the set changing underneath callers. | 33 // has additional smarts to help with the set changing underneath callers. |
32 class ChromeV8ContextSet { | 34 class ChromeV8ContextSet { |
33 public: | 35 public: |
34 ChromeV8ContextSet(); | 36 ChromeV8ContextSet(); |
35 ~ChromeV8ContextSet(); | 37 ~ChromeV8ContextSet(); |
36 | 38 |
37 int size() const; | 39 int size() const; |
38 | 40 |
(...skipping 27 matching lines...) Expand all Loading... |
66 const base::ListValue& arguments, | 68 const base::ListValue& arguments, |
67 content::RenderView* render_view, | 69 content::RenderView* render_view, |
68 const GURL& event_url) const; | 70 const GURL& event_url) const; |
69 | 71 |
70 private: | 72 private: |
71 ContextSet contexts_; | 73 ContextSet contexts_; |
72 | 74 |
73 DISALLOW_COPY_AND_ASSIGN(ChromeV8ContextSet); | 75 DISALLOW_COPY_AND_ASSIGN(ChromeV8ContextSet); |
74 }; | 76 }; |
75 | 77 |
| 78 } // namespace extensions |
| 79 |
76 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_SET_H_ | 80 #endif // CHROME_RENDERER_EXTENSIONS_CHROME_V8_CONTEXT_SET_H_ |
OLD | NEW |