| OLD | NEW |
| 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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 OnMoveRangeSelectionExtent) | 998 OnMoveRangeSelectionExtent) |
| 999 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) | 999 IPC_MESSAGE_HANDLER(InputMsg_Replace, OnReplace) |
| 1000 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) | 1000 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) |
| 1001 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, | 1001 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, |
| 1002 OnExtendSelectionAndDelete) | 1002 OnExtendSelectionAndDelete) |
| 1003 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, | 1003 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, |
| 1004 OnSetCompositionFromExistingText) | 1004 OnSetCompositionFromExistingText) |
| 1005 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, | 1005 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, |
| 1006 OnExecuteNoValueEditCommand) | 1006 OnExecuteNoValueEditCommand) |
| 1007 IPC_MESSAGE_HANDLER(FrameMsg_CSSInsertRequest, OnCSSInsertRequest) | 1007 IPC_MESSAGE_HANDLER(FrameMsg_CSSInsertRequest, OnCSSInsertRequest) |
| 1008 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole) |
| 1008 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, | 1009 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, |
| 1009 OnJavaScriptExecuteRequest) | 1010 OnJavaScriptExecuteRequest) |
| 1010 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, | 1011 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, |
| 1011 OnJavaScriptExecuteRequestForTests) | 1012 OnJavaScriptExecuteRequestForTests) |
| 1012 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestInIsolatedWorld, | 1013 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestInIsolatedWorld, |
| 1013 OnJavaScriptExecuteRequestInIsolatedWorld) | 1014 OnJavaScriptExecuteRequestInIsolatedWorld) |
| 1014 IPC_MESSAGE_HANDLER(FrameMsg_VisualStateRequest, | 1015 IPC_MESSAGE_HANDLER(FrameMsg_VisualStateRequest, |
| 1015 OnVisualStateRequest) | 1016 OnVisualStateRequest) |
| 1016 IPC_MESSAGE_HANDLER(FrameMsg_SetEditableSelectionOffsets, | 1017 IPC_MESSAGE_HANDLER(FrameMsg_SetEditableSelectionOffsets, |
| 1017 OnSetEditableSelectionOffsets) | 1018 OnSetEditableSelectionOffsets) |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 if (!frame_->hasSelection()) | 1332 if (!frame_->hasSelection()) |
| 1332 return; | 1333 return; |
| 1333 | 1334 |
| 1334 frame_->replaceMisspelledRange(text); | 1335 frame_->replaceMisspelledRange(text); |
| 1335 } | 1336 } |
| 1336 | 1337 |
| 1337 void RenderFrameImpl::OnCSSInsertRequest(const std::string& css) { | 1338 void RenderFrameImpl::OnCSSInsertRequest(const std::string& css) { |
| 1338 frame_->document().insertStyleSheet(WebString::fromUTF8(css)); | 1339 frame_->document().insertStyleSheet(WebString::fromUTF8(css)); |
| 1339 } | 1340 } |
| 1340 | 1341 |
| 1342 void RenderFrameImpl::OnAddMessageToConsole(ConsoleMessageLevel level, |
| 1343 const std::string& message) { |
| 1344 if (devtools_agent_) |
| 1345 devtools_agent_->AddMessageToConsole(level, message); |
| 1346 } |
| 1347 |
| 1341 void RenderFrameImpl::OnJavaScriptExecuteRequest( | 1348 void RenderFrameImpl::OnJavaScriptExecuteRequest( |
| 1342 const base::string16& jscript, | 1349 const base::string16& jscript, |
| 1343 int id, | 1350 int id, |
| 1344 bool notify_result) { | 1351 bool notify_result) { |
| 1345 TRACE_EVENT_INSTANT0("test_tracing", "OnJavaScriptExecuteRequest", | 1352 TRACE_EVENT_INSTANT0("test_tracing", "OnJavaScriptExecuteRequest", |
| 1346 TRACE_EVENT_SCOPE_THREAD); | 1353 TRACE_EVENT_SCOPE_THREAD); |
| 1347 | 1354 |
| 1348 v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); | 1355 v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); |
| 1349 v8::Local<v8::Value> result = | 1356 v8::Local<v8::Value> result = |
| 1350 frame_->executeScriptAndReturnValue(WebScriptSource(jscript)); | 1357 frame_->executeScriptAndReturnValue(WebScriptSource(jscript)); |
| (...skipping 3519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4870 #elif defined(ENABLE_BROWSER_CDMS) | 4877 #elif defined(ENABLE_BROWSER_CDMS) |
| 4871 cdm_manager_, | 4878 cdm_manager_, |
| 4872 #endif | 4879 #endif |
| 4873 this); | 4880 this); |
| 4874 } | 4881 } |
| 4875 | 4882 |
| 4876 return cdm_factory_; | 4883 return cdm_factory_; |
| 4877 } | 4884 } |
| 4878 | 4885 |
| 4879 } // namespace content | 4886 } // namespace content |
| OLD | NEW |