| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/renderer_host/render_view_host.h" | 5 #include "chrome/browser/renderer_host/render_view_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/gfx/native_widget_types.h" | 10 #include "base/gfx/native_widget_types.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 debugger_attached_(false), | 92 debugger_attached_(false), |
| 93 enabled_bindings_(0), | 93 enabled_bindings_(0), |
| 94 pending_request_id_(0), | 94 pending_request_id_(0), |
| 95 modal_dialog_count_(0), | 95 modal_dialog_count_(0), |
| 96 navigations_suspended_(false), | 96 navigations_suspended_(false), |
| 97 suspended_nav_message_(NULL), | 97 suspended_nav_message_(NULL), |
| 98 run_modal_reply_msg_(NULL), | 98 run_modal_reply_msg_(NULL), |
| 99 has_unload_listener_(false), | 99 has_unload_listener_(false), |
| 100 is_waiting_for_unload_ack_(false), | 100 is_waiting_for_unload_ack_(false), |
| 101 are_javascript_messages_suppressed_(false), | 101 are_javascript_messages_suppressed_(false), |
| 102 ALLOW_THIS_IN_INITIALIZER_LIST(extension_api_handler_(this)) { | 102 ALLOW_THIS_IN_INITIALIZER_LIST(extension_function_dispatcher_(this)) { |
| 103 DCHECK(instance_); | 103 DCHECK(instance_); |
| 104 DCHECK(delegate_); | 104 DCHECK(delegate_); |
| 105 if (modal_dialog_event == NULL) | 105 if (modal_dialog_event == NULL) |
| 106 modal_dialog_event = new base::WaitableEvent(true, false); | 106 modal_dialog_event = new base::WaitableEvent(true, false); |
| 107 | 107 |
| 108 modal_dialog_event_.reset(modal_dialog_event); | 108 modal_dialog_event_.reset(modal_dialog_event); |
| 109 #ifdef CHROME_PERSONALIZATION | 109 #ifdef CHROME_PERSONALIZATION |
| 110 personalization_ = Personalization::CreateHostPersonalization(this); | 110 personalization_ = Personalization::CreateHostPersonalization(this); |
| 111 #endif | 111 #endif |
| 112 } | 112 } |
| (...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1350 const std::string& target) { | 1350 const std::string& target) { |
| 1351 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), message, origin, | 1351 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id(), message, origin, |
| 1352 target)); | 1352 target)); |
| 1353 } | 1353 } |
| 1354 | 1354 |
| 1355 void RenderViewHost::OnExtensionRequest(const std::string& name, | 1355 void RenderViewHost::OnExtensionRequest(const std::string& name, |
| 1356 const std::string& args, | 1356 const std::string& args, |
| 1357 int callback_id) { | 1357 int callback_id) { |
| 1358 // TODO(aa): Here is where we can check that this renderer was supposed to be | 1358 // TODO(aa): Here is where we can check that this renderer was supposed to be |
| 1359 // able to call extension APIs. | 1359 // able to call extension APIs. |
| 1360 extension_api_handler_.HandleRequest(name, args, callback_id); | 1360 extension_function_dispatcher_.HandleRequest(name, args, callback_id); |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 void RenderViewHost::SendExtensionResponse(int callback_id, | 1363 void RenderViewHost::SendExtensionResponse(int callback_id, |
| 1364 const std::string& response) { | 1364 const std::string& response) { |
| 1365 Send(new ViewMsg_ExtensionResponse(routing_id(), callback_id, response)); | 1365 Send(new ViewMsg_ExtensionResponse(routing_id(), callback_id, response)); |
| 1366 } | 1366 } |
| OLD | NEW |