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

Side by Side Diff: chrome/browser/extensions/extension_function.cc

Issue 10114015: Fix bug where transient pages would miss events dispatched while it was (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: yoyo Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/extensions/extension_function.h" 5 #include "chrome/browser/extensions/extension_function.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/extensions/extension_function_dispatcher.h" 9 #include "chrome/browser/extensions/extension_function_dispatcher.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 if (process) 145 if (process)
146 base::KillProcess(process, content::RESULT_CODE_KILLED_BAD_MESSAGE, 146 base::KillProcess(process, content::RESULT_CODE_KILLED_BAD_MESSAGE,
147 false); 147 false);
148 } 148 }
149 } 149 }
150 UIThreadExtensionFunction::UIThreadExtensionFunction() 150 UIThreadExtensionFunction::UIThreadExtensionFunction()
151 : render_view_host_(NULL), profile_(NULL), delegate_(NULL) { 151 : render_view_host_(NULL), profile_(NULL), delegate_(NULL) {
152 } 152 }
153 153
154 UIThreadExtensionFunction::~UIThreadExtensionFunction() { 154 UIThreadExtensionFunction::~UIThreadExtensionFunction() {
155 if (dispatcher()) 155 if (dispatcher() && render_view_host())
156 dispatcher()->OnExtensionFunctionCompleted(GetExtension()); 156 dispatcher()->OnExtensionFunctionCompleted(GetExtension());
157 } 157 }
158 158
159 UIThreadExtensionFunction* 159 UIThreadExtensionFunction*
160 UIThreadExtensionFunction::AsUIThreadExtensionFunction() { 160 UIThreadExtensionFunction::AsUIThreadExtensionFunction() {
161 return this; 161 return this;
162 } 162 }
163 163
164 bool UIThreadExtensionFunction::OnMessageReceivedFromRenderView( 164 bool UIThreadExtensionFunction::OnMessageReceivedFromRenderView(
165 const IPC::Message& message) { 165 const IPC::Message& message) {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { 238 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() {
239 } 239 }
240 240
241 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { 241 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() {
242 } 242 }
243 243
244 void SyncIOThreadExtensionFunction::Run() { 244 void SyncIOThreadExtensionFunction::Run() {
245 SendResponse(RunImpl()); 245 SendResponse(RunImpl());
246 } 246 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_event_router.cc ('k') | chrome/browser/extensions/extension_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698