Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: content/renderer/mojo_bindings_controller.h

Issue 1470823002: Enable builtin Mojo JS modules in layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@usb-testing
Patch Set: oops, clumsy Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/public/common/bindings_policy.h ('k') | content/renderer/mojo_bindings_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BINDINGS_CONTROLLER_H_ 5 #ifndef CONTENT_RENDERER_MOJO_BINDINGS_CONTROLLER_H_
6 #define CONTENT_RENDERER_MOJO_BINDINGS_CONTROLLER_H_ 6 #define CONTENT_RENDERER_MOJO_BINDINGS_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 10 matching lines...) Expand all
21 class MojoContextState; 21 class MojoContextState;
22 22
23 // MojoBindingsController is responsible for enabling the renderer side of mojo 23 // MojoBindingsController is responsible for enabling the renderer side of mojo
24 // bindings. It creates (and destroys) a MojoContextState at the appropriate 24 // bindings. It creates (and destroys) a MojoContextState at the appropriate
25 // times and handles the necessary browser messages. MojoBindingsController 25 // times and handles the necessary browser messages. MojoBindingsController
26 // destroys itself when the RendererFrame it is created with is destroyed. 26 // destroys itself when the RendererFrame it is created with is destroyed.
27 class MojoBindingsController 27 class MojoBindingsController
28 : public RenderFrameObserver, 28 : public RenderFrameObserver,
29 public RenderFrameObserverTracker<MojoBindingsController> { 29 public RenderFrameObserverTracker<MojoBindingsController> {
30 public: 30 public:
31 explicit MojoBindingsController(RenderFrame* render_frame); 31 MojoBindingsController(RenderFrame* render_frame, bool for_layout_tests);
32 32
33 private: 33 private:
34 ~MojoBindingsController() override; 34 ~MojoBindingsController() override;
35 35
36 void CreateContextState(); 36 void CreateContextState();
37 void DestroyContextState(v8::Local<v8::Context> context); 37 void DestroyContextState(v8::Local<v8::Context> context);
38 MojoContextState* GetContextState(); 38 MojoContextState* GetContextState();
39 39
40 // RenderFrameObserver overrides: 40 // RenderFrameObserver overrides:
41 void WillReleaseScriptContext(v8::Local<v8::Context> context, 41 void WillReleaseScriptContext(v8::Local<v8::Context> context,
42 int world_id) override; 42 int world_id) override;
43 void DidFinishDocumentLoad() override; 43 void DidFinishDocumentLoad() override;
44 void DidCreateDocumentElement() override; 44 void DidCreateDocumentElement() override;
45 void DidClearWindowObject() override; 45 void DidClearWindowObject() override;
46 46
47 const bool for_layout_tests_;
48
47 DISALLOW_COPY_AND_ASSIGN(MojoBindingsController); 49 DISALLOW_COPY_AND_ASSIGN(MojoBindingsController);
48 }; 50 };
49 51
50 } // namespace content 52 } // namespace content
51 53
52 #endif // CONTENT_RENDERER_MOJO_BINDINGS_CONTROLLER_H_ 54 #endif // CONTENT_RENDERER_MOJO_BINDINGS_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/public/common/bindings_policy.h ('k') | content/renderer/mojo_bindings_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698