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

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

Issue 2034153002: Makes RenderFrameObserver/RenderViewObserver::OnDestruct pure virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 6 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 #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
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
OLDNEW
« no previous file with comments | « content/renderer/mojo_bindings_controller.h ('k') | content/renderer/notification_permission_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698