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

Side by Side Diff: extensions/renderer/extension_frame_helper.cc

Issue 1200503002: [Extensions] Kill off ExtensionMsg_AddMessageToConsole (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 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 | « extensions/renderer/extension_frame_helper.h ('k') | extensions/renderer/extension_helper.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "extensions/renderer/extension_frame_helper.h" 5 #include "extensions/renderer/extension_frame_helper.h"
6 6
7 #include "content/public/renderer/render_frame.h" 7 #include "content/public/renderer/render_frame.h"
8 #include "extensions/common/api/messaging/message.h" 8 #include "extensions/common/api/messaging/message.h"
9 #include "extensions/common/constants.h" 9 #include "extensions/common/constants.h"
10 #include "extensions/common/extension_messages.h" 10 #include "extensions/common/extension_messages.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 void ExtensionFrameHelper::WillReleaseScriptContext( 109 void ExtensionFrameHelper::WillReleaseScriptContext(
110 v8::Local<v8::Context> context, 110 v8::Local<v8::Context> context,
111 int world_id) { 111 int world_id) {
112 extension_dispatcher_->WillReleaseScriptContext( 112 extension_dispatcher_->WillReleaseScriptContext(
113 render_frame()->GetWebFrame(), context, world_id); 113 render_frame()->GetWebFrame(), context, world_id);
114 } 114 }
115 115
116 bool ExtensionFrameHelper::OnMessageReceived(const IPC::Message& message) { 116 bool ExtensionFrameHelper::OnMessageReceived(const IPC::Message& message) {
117 bool handled = true; 117 bool handled = true;
118 IPC_BEGIN_MESSAGE_MAP(ExtensionFrameHelper, message) 118 IPC_BEGIN_MESSAGE_MAP(ExtensionFrameHelper, message)
119 IPC_MESSAGE_HANDLER(ExtensionMsg_AddMessageToConsole,
120 OnAddMessageToConsole)
121 IPC_MESSAGE_HANDLER(ExtensionMsg_DispatchOnConnect, 119 IPC_MESSAGE_HANDLER(ExtensionMsg_DispatchOnConnect,
122 OnExtensionDispatchOnConnect) 120 OnExtensionDispatchOnConnect)
123 IPC_MESSAGE_HANDLER(ExtensionMsg_DeliverMessage, OnExtensionDeliverMessage) 121 IPC_MESSAGE_HANDLER(ExtensionMsg_DeliverMessage, OnExtensionDeliverMessage)
124 IPC_MESSAGE_HANDLER(ExtensionMsg_DispatchOnDisconnect, 122 IPC_MESSAGE_HANDLER(ExtensionMsg_DispatchOnDisconnect,
125 OnExtensionDispatchOnDisconnect) 123 OnExtensionDispatchOnDisconnect)
126 IPC_MESSAGE_HANDLER(ExtensionMsg_SetTabId, OnExtensionSetTabId) 124 IPC_MESSAGE_HANDLER(ExtensionMsg_SetTabId, OnExtensionSetTabId)
127 IPC_MESSAGE_HANDLER(ExtensionMsg_UpdateBrowserWindowId, 125 IPC_MESSAGE_HANDLER(ExtensionMsg_UpdateBrowserWindowId,
128 OnUpdateBrowserWindowId) 126 OnUpdateBrowserWindowId)
129 IPC_MESSAGE_HANDLER(ExtensionMsg_SetMainFrameExtensionOwner, 127 IPC_MESSAGE_HANDLER(ExtensionMsg_SetMainFrameExtensionOwner,
130 OnSetMainFrameExtensionOwner) 128 OnSetMainFrameExtensionOwner)
131 IPC_MESSAGE_HANDLER(ExtensionMsg_NotifyRenderViewType, 129 IPC_MESSAGE_HANDLER(ExtensionMsg_NotifyRenderViewType,
132 OnNotifyRendererViewType) 130 OnNotifyRendererViewType)
133 IPC_MESSAGE_HANDLER(ExtensionMsg_Response, OnExtensionResponse) 131 IPC_MESSAGE_HANDLER(ExtensionMsg_Response, OnExtensionResponse)
134 IPC_MESSAGE_HANDLER(ExtensionMsg_MessageInvoke, OnExtensionMessageInvoke) 132 IPC_MESSAGE_HANDLER(ExtensionMsg_MessageInvoke, OnExtensionMessageInvoke)
135 IPC_MESSAGE_UNHANDLED(handled = false) 133 IPC_MESSAGE_UNHANDLED(handled = false)
136 IPC_END_MESSAGE_MAP() 134 IPC_END_MESSAGE_MAP()
137 return handled; 135 return handled;
138 } 136 }
139 137
140 void ExtensionFrameHelper::OnAddMessageToConsole(
141 content::ConsoleMessageLevel level,
142 const std::string& message) {
143 console::AddMessage(render_frame()->GetRenderView(), level, message);
144 }
145
146 void ExtensionFrameHelper::OnExtensionDispatchOnConnect( 138 void ExtensionFrameHelper::OnExtensionDispatchOnConnect(
147 int target_port_id, 139 int target_port_id,
148 const std::string& channel_name, 140 const std::string& channel_name,
149 const ExtensionMsg_TabConnectionInfo& source, 141 const ExtensionMsg_TabConnectionInfo& source,
150 const ExtensionMsg_ExternalConnectionInfo& info, 142 const ExtensionMsg_ExternalConnectionInfo& info,
151 const std::string& tls_channel_id) { 143 const std::string& tls_channel_id) {
152 MessagingBindings::DispatchOnConnect( 144 MessagingBindings::DispatchOnConnect(
153 extension_dispatcher_->script_context_set(), 145 extension_dispatcher_->script_context_set(),
154 target_port_id, 146 target_port_id,
155 channel_name, 147 channel_name,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 const std::string& module_name, 202 const std::string& module_name,
211 const std::string& function_name, 203 const std::string& function_name,
212 const base::ListValue& args, 204 const base::ListValue& args,
213 bool user_gesture) { 205 bool user_gesture) {
214 extension_dispatcher_->InvokeModuleSystemMethod(render_frame(), extension_id, 206 extension_dispatcher_->InvokeModuleSystemMethod(render_frame(), extension_id,
215 module_name, function_name, 207 module_name, function_name,
216 args, user_gesture); 208 args, user_gesture);
217 } 209 }
218 210
219 } // namespace extensions 211 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/extension_frame_helper.h ('k') | extensions/renderer/extension_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698