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

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

Issue 1642283002: Deal with frame removal by content scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Last nits Created 4 years, 9 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
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 11 matching lines...) Expand all
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 MojoBindingsController(RenderFrame* render_frame, bool for_layout_tests); 31 MojoBindingsController(RenderFrame* render_frame, bool for_layout_tests);
32 void RunScriptsAtDocumentStart();
33 void RunScriptsAtDocumentReady();
32 34
33 private: 35 private:
34 ~MojoBindingsController() override; 36 ~MojoBindingsController() override;
35 37
36 void CreateContextState(); 38 void CreateContextState();
37 void DestroyContextState(v8::Local<v8::Context> context); 39 void DestroyContextState(v8::Local<v8::Context> context);
38 MojoContextState* GetContextState(); 40 MojoContextState* GetContextState();
39 41
40 // RenderFrameObserver overrides: 42 // RenderFrameObserver overrides:
41 void WillReleaseScriptContext(v8::Local<v8::Context> context, 43 void WillReleaseScriptContext(v8::Local<v8::Context> context,
42 int world_id) override; 44 int world_id) override;
43 void DidFinishDocumentLoad() override;
44 void DidCreateDocumentElement() override;
45 void DidClearWindowObject() override; 45 void DidClearWindowObject() override;
46 46
47 const bool for_layout_tests_; 47 const bool for_layout_tests_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(MojoBindingsController); 49 DISALLOW_COPY_AND_ASSIGN(MojoBindingsController);
50 }; 50 };
51 51
52 } // namespace content 52 } // namespace content
53 53
54 #endif // CONTENT_RENDERER_MOJO_BINDINGS_CONTROLLER_H_ 54 #endif // CONTENT_RENDERER_MOJO_BINDINGS_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/public/renderer/content_renderer_client.h ('k') | content/renderer/mojo_bindings_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698