OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_RENDERER_MOJO_CONTEXT_STATE_H_ | 5 #ifndef CONTENT_RENDERER_MOJO_CONTEXT_STATE_H_ |
6 #define CONTENT_RENDERER_MOJO_CONTEXT_STATE_H_ | 6 #define CONTENT_RENDERER_MOJO_CONTEXT_STATE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 | 28 |
29 class ResourceFetcher; | 29 class ResourceFetcher; |
30 class MojoMainRunner; | 30 class MojoMainRunner; |
31 | 31 |
32 // MojoContextState manages the modules needed for mojo bindings. It does this | 32 // MojoContextState manages the modules needed for mojo bindings. It does this |
33 // by way of gin. Non-builtin modules are downloaded by way of ResourceFetchers. | 33 // by way of gin. Non-builtin modules are downloaded by way of ResourceFetchers. |
34 class MojoContextState : public gin::ModuleRegistryObserver { | 34 class MojoContextState : public gin::ModuleRegistryObserver { |
35 public: | 35 public: |
36 MojoContextState(blink::WebFrame* frame, v8::Local<v8::Context> context); | 36 MojoContextState(blink::WebFrame* frame, |
| 37 v8::Local<v8::Context> context, |
| 38 bool for_layout_tests); |
37 ~MojoContextState() override; | 39 ~MojoContextState() override; |
38 | 40 |
39 void Run(); | 41 void Run(); |
40 | 42 |
41 // Returns true if at least one module was added. | 43 // Returns true if at least one module was added. |
42 bool module_added() const { return module_added_; } | 44 bool module_added() const { return module_added_; } |
43 | 45 |
44 private: | 46 private: |
45 class Loader; | 47 class Loader; |
46 | 48 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 80 |
79 // The prefix to use for all module requests. | 81 // The prefix to use for all module requests. |
80 const std::string module_prefix_; | 82 const std::string module_prefix_; |
81 | 83 |
82 DISALLOW_COPY_AND_ASSIGN(MojoContextState); | 84 DISALLOW_COPY_AND_ASSIGN(MojoContextState); |
83 }; | 85 }; |
84 | 86 |
85 } // namespace content | 87 } // namespace content |
86 | 88 |
87 #endif // CONTENT_RENDERER_MOJO_CONTEXT_STATE_H_ | 89 #endif // CONTENT_RENDERER_MOJO_CONTEXT_STATE_H_ |
OLD | NEW |