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

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: Created 5 years, 6 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
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_UNHANDLED(handled = false) 132 IPC_MESSAGE_UNHANDLED(handled = false)
135 IPC_END_MESSAGE_MAP() 133 IPC_END_MESSAGE_MAP()
136 return handled; 134 return handled;
137 } 135 }
138 136
139 void ExtensionFrameHelper::OnAddMessageToConsole(
140 content::ConsoleMessageLevel level,
141 const std::string& message) {
142 console::AddMessage(render_frame()->GetRenderView(), level, message);
143 }
144
145 void ExtensionFrameHelper::OnExtensionDispatchOnConnect( 137 void ExtensionFrameHelper::OnExtensionDispatchOnConnect(
146 int target_port_id, 138 int target_port_id,
147 const std::string& channel_name, 139 const std::string& channel_name,
148 const ExtensionMsg_TabConnectionInfo& source, 140 const ExtensionMsg_TabConnectionInfo& source,
149 const ExtensionMsg_ExternalConnectionInfo& info, 141 const ExtensionMsg_ExternalConnectionInfo& info,
150 const std::string& tls_channel_id) { 142 const std::string& tls_channel_id) {
151 MessagingBindings::DispatchOnConnect( 143 MessagingBindings::DispatchOnConnect(
152 extension_dispatcher_->script_context_set(), 144 extension_dispatcher_->script_context_set(),
153 target_port_id, 145 target_port_id,
154 channel_name, 146 channel_name,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 bool success, 190 bool success,
199 const base::ListValue& response, 191 const base::ListValue& response,
200 const std::string& error) { 192 const std::string& error) {
201 extension_dispatcher_->OnExtensionResponse(request_id, 193 extension_dispatcher_->OnExtensionResponse(request_id,
202 success, 194 success,
203 response, 195 response,
204 error); 196 error);
205 } 197 }
206 198
207 } // namespace extensions 199 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698