| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chrome_extension_message_filter.h" | 5 #include "chrome/browser/renderer_host/chrome_extension_message_filter.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 int receiver_port_id, | 149 int receiver_port_id, |
| 150 const ExtensionMsg_ExternalConnectionInfo& info, | 150 const ExtensionMsg_ExternalConnectionInfo& info, |
| 151 const std::string& channel_name, | 151 const std::string& channel_name, |
| 152 bool include_tls_channel_id) { | 152 bool include_tls_channel_id) { |
| 153 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 153 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 154 if (profile_) { | 154 if (profile_) { |
| 155 extensions::MessageService::Get(profile_) | 155 extensions::MessageService::Get(profile_) |
| 156 ->OpenChannelToExtension(source_process_id, | 156 ->OpenChannelToExtension(source_process_id, |
| 157 source_routing_id, | 157 source_routing_id, |
| 158 receiver_port_id, | 158 receiver_port_id, |
| 159 info.source_frame_id, |
| 159 info.source_id, | 160 info.source_id, |
| 160 info.target_id, | 161 info.target_id, |
| 161 info.source_url, | 162 info.source_url, |
| 162 channel_name, | 163 channel_name, |
| 163 include_tls_channel_id); | 164 include_tls_channel_id); |
| 164 } | 165 } |
| 165 } | 166 } |
| 166 | 167 |
| 167 void ChromeExtensionMessageFilter::OnOpenChannelToNativeApp( | 168 void ChromeExtensionMessageFilter::OnOpenChannelToNativeApp( |
| 168 int routing_id, | 169 int routing_id, |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 AddActionToExtensionActivityLog(profile_, action); | 327 AddActionToExtensionActivityLog(profile_, action); |
| 327 } | 328 } |
| 328 | 329 |
| 329 void ChromeExtensionMessageFilter::Observe( | 330 void ChromeExtensionMessageFilter::Observe( |
| 330 int type, | 331 int type, |
| 331 const content::NotificationSource& source, | 332 const content::NotificationSource& source, |
| 332 const content::NotificationDetails& details) { | 333 const content::NotificationDetails& details) { |
| 333 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); | 334 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); |
| 334 profile_ = NULL; | 335 profile_ = NULL; |
| 335 } | 336 } |
| OLD | NEW |