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 #include "content/renderer/mojo_bindings_controller.h" | 5 #include "content/renderer/mojo_bindings_controller.h" |
6 | 6 |
7 #include "content/common/view_messages.h" | 7 #include "content/common/view_messages.h" |
8 #include "content/public/renderer/render_frame.h" | 8 #include "content/public/renderer/render_frame.h" |
9 #include "content/public/renderer/render_view.h" | 9 #include "content/public/renderer/render_view.h" |
10 #include "content/renderer/mojo_context_state.h" | 10 #include "content/renderer/mojo_context_state.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // lost. If this is the result of the first load then the contextstate should | 91 // lost. If this is the result of the first load then the contextstate should |
92 // be empty and we don't need to destroy it. | 92 // be empty and we don't need to destroy it. |
93 MojoContextState* state = GetContextState(); | 93 MojoContextState* state = GetContextState(); |
94 if (state && !state->module_added()) | 94 if (state && !state->module_added()) |
95 return; | 95 return; |
96 | 96 |
97 v8::HandleScope handle_scope(blink::mainThreadIsolate()); | 97 v8::HandleScope handle_scope(blink::mainThreadIsolate()); |
98 DestroyContextState(render_frame()->GetWebFrame()->mainWorldScriptContext()); | 98 DestroyContextState(render_frame()->GetWebFrame()->mainWorldScriptContext()); |
99 } | 99 } |
100 | 100 |
| 101 void MojoBindingsController::OnDestruct() { |
| 102 delete this; |
| 103 } |
| 104 |
101 } // namespace content | 105 } // namespace content |
OLD | NEW |