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