Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(961)

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 155707: Changed the extension.connect() API not to broadcast to all tabs. Added a (Closed)
Patch Set: review comments Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/profile.cc ('k') | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "chrome/browser/renderer_host/browser_render_process_host.h" 8 #include "chrome/browser/renderer_host/browser_render_process_host.h"
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 } 956 }
957 default: { 957 default: {
958 NOTREACHED(); 958 NOTREACHED();
959 break; 959 break;
960 } 960 }
961 } 961 }
962 } 962 }
963 963
964 void BrowserRenderProcessHost::OnExtensionAddListener( 964 void BrowserRenderProcessHost::OnExtensionAddListener(
965 const std::string& event_name) { 965 const std::string& event_name) {
966 ExtensionMessageService::GetInstance(profile()->GetRequestContext())-> 966 if (profile()->GetExtensionMessageService()) {
967 AddEventListener(event_name, pid()); 967 profile()->GetExtensionMessageService()->AddEventListener(event_name,
968 pid());
969 }
968 } 970 }
969 971
970 void BrowserRenderProcessHost::OnExtensionRemoveListener( 972 void BrowserRenderProcessHost::OnExtensionRemoveListener(
971 const std::string& event_name) { 973 const std::string& event_name) {
972 ExtensionMessageService::GetInstance(profile()->GetRequestContext())-> 974 if (profile()->GetExtensionMessageService()) {
973 RemoveEventListener(event_name, pid()); 975 profile()->GetExtensionMessageService()->RemoveEventListener(event_name,
976 pid());
977 }
974 } 978 }
975 979
976 void BrowserRenderProcessHost::OnExtensionCloseChannel(int port_id) { 980 void BrowserRenderProcessHost::OnExtensionCloseChannel(int port_id) {
977 ExtensionMessageService::GetInstance(profile()->GetRequestContext())-> 981 if (profile()->GetExtensionMessageService()) {
978 CloseChannel(port_id); 982 profile()->GetExtensionMessageService()->CloseChannel(port_id);
983 }
979 } 984 }
OLDNEW
« no previous file with comments | « chrome/browser/profile.cc ('k') | chrome/browser/renderer_host/render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698