OLD | NEW |
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 return dispatcher()->GetCurrentBrowser(render_view_host_, include_incognito_); | 180 return dispatcher()->GetCurrentBrowser(render_view_host_, include_incognito_); |
181 } | 181 } |
182 | 182 |
183 void UIThreadExtensionFunction::SendResponse(bool success) { | 183 void UIThreadExtensionFunction::SendResponse(bool success) { |
184 if (delegate_) { | 184 if (delegate_) { |
185 delegate_->OnSendResponse(this, success); | 185 delegate_->OnSendResponse(this, success); |
186 } else { | 186 } else { |
187 if (!render_view_host_ || !dispatcher()) | 187 if (!render_view_host_ || !dispatcher()) |
188 return; | 188 return; |
189 | 189 |
190 SendResponseImpl(render_view_host_->process()->GetHandle(), | 190 SendResponseImpl(render_view_host_->GetProcess()->GetHandle(), |
191 render_view_host_, | 191 render_view_host_, |
192 render_view_host_->routing_id(), | 192 render_view_host_->GetRoutingID(), |
193 success); | 193 success); |
194 } | 194 } |
195 } | 195 } |
196 | 196 |
197 IOThreadExtensionFunction::IOThreadExtensionFunction() | 197 IOThreadExtensionFunction::IOThreadExtensionFunction() |
198 : routing_id_(-1) { | 198 : routing_id_(-1) { |
199 } | 199 } |
200 | 200 |
201 IOThreadExtensionFunction::~IOThreadExtensionFunction() { | 201 IOThreadExtensionFunction::~IOThreadExtensionFunction() { |
202 } | 202 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 236 |
237 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { | 237 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { |
238 } | 238 } |
239 | 239 |
240 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { | 240 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { |
241 } | 241 } |
242 | 242 |
243 void SyncIOThreadExtensionFunction::Run() { | 243 void SyncIOThreadExtensionFunction::Run() { |
244 SendResponse(RunImpl()); | 244 SendResponse(RunImpl()); |
245 } | 245 } |
OLD | NEW |