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

Side by Side Diff: content/renderer/render_frame_impl.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 "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 OnMoveRangeSelectionExtent) 1003 OnMoveRangeSelectionExtent)
1004 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) 1004 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace)
1005 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) 1005 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling)
1006 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, 1006 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete,
1007 OnExtendSelectionAndDelete) 1007 OnExtendSelectionAndDelete)
1008 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, 1008 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText,
1009 OnSetCompositionFromExistingText) 1009 OnSetCompositionFromExistingText)
1010 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, 1010 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand,
1011 OnExecuteNoValueEditCommand) 1011 OnExecuteNoValueEditCommand)
1012 IPC_MESSAGE_HANDLER(FrameMsg_CSSInsertRequest, OnCSSInsertRequest) 1012 IPC_MESSAGE_HANDLER(FrameMsg_CSSInsertRequest, OnCSSInsertRequest)
1013 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole) 1013 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, AddMessageToConsole)
nasko 2015/06/23 10:53:13 Let's leave OnAddMessageToConsole as the handler,
Devlin 2015/06/23 16:49:19 Done.
1014 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, 1014 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest,
1015 OnJavaScriptExecuteRequest) 1015 OnJavaScriptExecuteRequest)
1016 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, 1016 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests,
1017 OnJavaScriptExecuteRequestForTests) 1017 OnJavaScriptExecuteRequestForTests)
1018 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestInIsolatedWorld, 1018 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestInIsolatedWorld,
1019 OnJavaScriptExecuteRequestInIsolatedWorld) 1019 OnJavaScriptExecuteRequestInIsolatedWorld)
1020 IPC_MESSAGE_HANDLER(FrameMsg_VisualStateRequest, 1020 IPC_MESSAGE_HANDLER(FrameMsg_VisualStateRequest,
1021 OnVisualStateRequest) 1021 OnVisualStateRequest)
1022 IPC_MESSAGE_HANDLER(FrameMsg_SetEditableSelectionOffsets, 1022 IPC_MESSAGE_HANDLER(FrameMsg_SetEditableSelectionOffsets,
1023 OnSetEditableSelectionOffsets) 1023 OnSetEditableSelectionOffsets)
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 if (!frame_->hasSelection()) 1338 if (!frame_->hasSelection())
1339 return; 1339 return;
1340 1340
1341 frame_->replaceMisspelledRange(text); 1341 frame_->replaceMisspelledRange(text);
1342 } 1342 }
1343 1343
1344 void RenderFrameImpl::OnCSSInsertRequest(const std::string& css) { 1344 void RenderFrameImpl::OnCSSInsertRequest(const std::string& css) {
1345 frame_->document().insertStyleSheet(WebString::fromUTF8(css)); 1345 frame_->document().insertStyleSheet(WebString::fromUTF8(css));
1346 } 1346 }
1347 1347
1348 void RenderFrameImpl::OnAddMessageToConsole(ConsoleMessageLevel level,
1349 const std::string& message) {
1350 if (devtools_agent_)
1351 devtools_agent_->AddMessageToConsole(level, message);
1352 }
1353
1354 void RenderFrameImpl::OnJavaScriptExecuteRequest( 1348 void RenderFrameImpl::OnJavaScriptExecuteRequest(
1355 const base::string16& jscript, 1349 const base::string16& jscript,
1356 int id, 1350 int id,
1357 bool notify_result) { 1351 bool notify_result) {
1358 TRACE_EVENT_INSTANT0("test_tracing", "OnJavaScriptExecuteRequest", 1352 TRACE_EVENT_INSTANT0("test_tracing", "OnJavaScriptExecuteRequest",
1359 TRACE_EVENT_SCOPE_THREAD); 1353 TRACE_EVENT_SCOPE_THREAD);
1360 1354
1361 v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); 1355 v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
1362 v8::Local<v8::Value> result = 1356 v8::Local<v8::Value> result =
1363 frame_->executeScriptAndReturnValue(WebScriptSource(jscript)); 1357 frame_->executeScriptAndReturnValue(WebScriptSource(jscript));
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 isolate, mojo::js::Core::kModuleName, mojo::js::Core::GetModule(isolate)); 1878 isolate, mojo::js::Core::kModuleName, mojo::js::Core::GetModule(isolate));
1885 registry->AddBuiltinModule(isolate, 1879 registry->AddBuiltinModule(isolate,
1886 mojo::js::Support::kModuleName, 1880 mojo::js::Support::kModuleName,
1887 mojo::js::Support::GetModule(isolate)); 1881 mojo::js::Support::GetModule(isolate));
1888 registry->AddBuiltinModule( 1882 registry->AddBuiltinModule(
1889 isolate, 1883 isolate,
1890 ServiceRegistryJsWrapper::kModuleName, 1884 ServiceRegistryJsWrapper::kModuleName,
1891 ServiceRegistryJsWrapper::Create(isolate, &service_registry_).ToV8()); 1885 ServiceRegistryJsWrapper::Create(isolate, &service_registry_).ToV8());
1892 } 1886 }
1893 1887
1888 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level,
1889 const std::string& message) {
1890 if (devtools_agent_)
1891 devtools_agent_->AddMessageToConsole(level, message);
1892 }
1893
1894 // blink::WebFrameClient implementation ---------------------------------------- 1894 // blink::WebFrameClient implementation ----------------------------------------
1895 1895
1896 blink::WebPluginPlaceholder* RenderFrameImpl::createPluginPlaceholder( 1896 blink::WebPluginPlaceholder* RenderFrameImpl::createPluginPlaceholder(
1897 blink::WebLocalFrame* frame, 1897 blink::WebLocalFrame* frame,
1898 const blink::WebPluginParams& params) { 1898 const blink::WebPluginParams& params) {
1899 DCHECK_EQ(frame_, frame); 1899 DCHECK_EQ(frame_, frame);
1900 return GetContentClient() 1900 return GetContentClient()
1901 ->renderer() 1901 ->renderer()
1902 ->CreatePluginPlaceholder(this, frame, params) 1902 ->CreatePluginPlaceholder(this, frame, params)
1903 .release(); 1903 .release();
(...skipping 3044 matching lines...) Expand 10 before | Expand all | Expand 10 after
4948 #elif defined(ENABLE_BROWSER_CDMS) 4948 #elif defined(ENABLE_BROWSER_CDMS)
4949 cdm_manager_, 4949 cdm_manager_,
4950 #endif 4950 #endif
4951 this); 4951 this);
4952 } 4952 }
4953 4953
4954 return cdm_factory_; 4954 return cdm_factory_;
4955 } 4955 }
4956 4956
4957 } // namespace content 4957 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | extensions/browser/api/alarms/alarms_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698