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_WEB_UI_MOJO_CONTEXT_STATE_H_ | 5 #ifndef CONTENT_RENDERER_WEB_UI_MOJO_CONTEXT_STATE_H_ |
6 #define CONTENT_RENDERER_WEB_UI_MOJO_CONTEXT_STATE_H_ | 6 #define CONTENT_RENDERER_WEB_UI_MOJO_CONTEXT_STATE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 class ResourceFetcher; | 28 class ResourceFetcher; |
29 class WebUIRunner; | 29 class WebUIRunner; |
30 | 30 |
31 // WebUIMojoContextState manages the modules needed for mojo bindings. It does | 31 // WebUIMojoContextState manages the modules needed for mojo bindings. It does |
32 // this by way of gin. Non-builtin modules are downloaded by way of | 32 // this by way of gin. Non-builtin modules are downloaded by way of |
33 // ResourceFetchers. | 33 // ResourceFetchers. |
34 class WebUIMojoContextState : public gin::ModuleRegistryObserver { | 34 class WebUIMojoContextState : public gin::ModuleRegistryObserver { |
35 public: | 35 public: |
36 WebUIMojoContextState(blink::WebFrame* frame, | 36 WebUIMojoContextState(blink::WebFrame* frame, |
37 v8::Handle<v8::Context> context); | 37 v8::Local<v8::Context> context); |
38 ~WebUIMojoContextState() override; | 38 ~WebUIMojoContextState() override; |
39 | 39 |
40 void Run(); | 40 void Run(); |
41 | 41 |
42 // Returns true if at least one module was added. | 42 // Returns true if at least one module was added. |
43 bool module_added() const { return module_added_; } | 43 bool module_added() const { return module_added_; } |
44 | 44 |
45 private: | 45 private: |
46 class Loader; | 46 class Loader; |
47 | 47 |
(...skipping 28 matching lines...) Expand all Loading... |
76 | 76 |
77 // Set of modules we've fetched script from. | 77 // Set of modules we've fetched script from. |
78 std::set<std::string> fetched_modules_; | 78 std::set<std::string> fetched_modules_; |
79 | 79 |
80 DISALLOW_COPY_AND_ASSIGN(WebUIMojoContextState); | 80 DISALLOW_COPY_AND_ASSIGN(WebUIMojoContextState); |
81 }; | 81 }; |
82 | 82 |
83 } // namespace content | 83 } // namespace content |
84 | 84 |
85 #endif // CONTENT_RENDERER_WEB_UI_MOJO_CONTEXT_STATE_H_ | 85 #endif // CONTENT_RENDERER_WEB_UI_MOJO_CONTEXT_STATE_H_ |
OLD | NEW |