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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 if (!render_view_host_ || !dispatcher()) | 282 if (!render_view_host_ || !dispatcher()) |
283 return; | 283 return; |
284 | 284 |
285 SendResponseImpl(render_view_host_->GetProcess()->GetHandle(), | 285 SendResponseImpl(render_view_host_->GetProcess()->GetHandle(), |
286 render_view_host_, | 286 render_view_host_, |
287 render_view_host_->GetRoutingID(), | 287 render_view_host_->GetRoutingID(), |
288 success); | 288 success); |
289 } | 289 } |
290 } | 290 } |
291 | 291 |
| 292 void UIThreadExtensionFunction::WriteToConsole( |
| 293 content::ConsoleMessageLevel level, |
| 294 const std::string& message) { |
| 295 render_view_host_->Send(new ExtensionMsg_AddMessageToConsole( |
| 296 render_view_host_->GetRoutingID(), level, message)); |
| 297 } |
| 298 |
292 IOThreadExtensionFunction::IOThreadExtensionFunction() | 299 IOThreadExtensionFunction::IOThreadExtensionFunction() |
293 : routing_id_(-1) { | 300 : routing_id_(-1) { |
294 } | 301 } |
295 | 302 |
296 IOThreadExtensionFunction::~IOThreadExtensionFunction() { | 303 IOThreadExtensionFunction::~IOThreadExtensionFunction() { |
297 } | 304 } |
298 | 305 |
299 IOThreadExtensionFunction* | 306 IOThreadExtensionFunction* |
300 IOThreadExtensionFunction::AsIOThreadExtensionFunction() { | 307 IOThreadExtensionFunction::AsIOThreadExtensionFunction() { |
301 return this; | 308 return this; |
(...skipping 29 matching lines...) Expand all Loading... |
331 | 338 |
332 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { | 339 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { |
333 } | 340 } |
334 | 341 |
335 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { | 342 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { |
336 } | 343 } |
337 | 344 |
338 void SyncIOThreadExtensionFunction::Run() { | 345 void SyncIOThreadExtensionFunction::Run() { |
339 SendResponse(RunImpl()); | 346 SendResponse(RunImpl()); |
340 } | 347 } |
OLD | NEW |