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 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1516 IPC_MESSAGE_HANDLER(FrameMsg_CopyImageAt, OnCopyImageAt) | 1516 IPC_MESSAGE_HANDLER(FrameMsg_CopyImageAt, OnCopyImageAt) |
1517 IPC_MESSAGE_HANDLER(FrameMsg_SaveImageAt, OnSaveImageAt) | 1517 IPC_MESSAGE_HANDLER(FrameMsg_SaveImageAt, OnSaveImageAt) |
1518 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, | 1518 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, |
1519 OnExtendSelectionAndDelete) | 1519 OnExtendSelectionAndDelete) |
1520 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, | 1520 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, |
1521 OnSetCompositionFromExistingText) | 1521 OnSetCompositionFromExistingText) |
1522 IPC_MESSAGE_HANDLER(InputMsg_SetEditableSelectionOffsets, | 1522 IPC_MESSAGE_HANDLER(InputMsg_SetEditableSelectionOffsets, |
1523 OnSetEditableSelectionOffsets) | 1523 OnSetEditableSelectionOffsets) |
1524 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, | 1524 IPC_MESSAGE_HANDLER(InputMsg_ExecuteNoValueEditCommand, |
1525 OnExecuteNoValueEditCommand) | 1525 OnExecuteNoValueEditCommand) |
1526 IPC_MESSAGE_HANDLER(FrameMsg_CSSInsertRequest, OnCSSInsertRequest) | |
1527 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole) | 1526 IPC_MESSAGE_HANDLER(FrameMsg_AddMessageToConsole, OnAddMessageToConsole) |
1528 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, | 1527 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, |
1529 OnJavaScriptExecuteRequest) | 1528 OnJavaScriptExecuteRequest) |
1530 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, | 1529 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, |
1531 OnJavaScriptExecuteRequestForTests) | 1530 OnJavaScriptExecuteRequestForTests) |
1532 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestInIsolatedWorld, | 1531 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestInIsolatedWorld, |
1533 OnJavaScriptExecuteRequestInIsolatedWorld) | 1532 OnJavaScriptExecuteRequestInIsolatedWorld) |
1534 IPC_MESSAGE_HANDLER(FrameMsg_VisualStateRequest, | 1533 IPC_MESSAGE_HANDLER(FrameMsg_VisualStateRequest, |
1535 OnVisualStateRequest) | 1534 OnVisualStateRequest) |
1536 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) | 1535 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1908 } | 1907 } |
1909 | 1908 |
1910 void RenderFrameImpl::OnCopyImageAt(int x, int y) { | 1909 void RenderFrameImpl::OnCopyImageAt(int x, int y) { |
1911 frame_->copyImageAt(WebPoint(x, y)); | 1910 frame_->copyImageAt(WebPoint(x, y)); |
1912 } | 1911 } |
1913 | 1912 |
1914 void RenderFrameImpl::OnSaveImageAt(int x, int y) { | 1913 void RenderFrameImpl::OnSaveImageAt(int x, int y) { |
1915 frame_->saveImageAt(WebPoint(x, y)); | 1914 frame_->saveImageAt(WebPoint(x, y)); |
1916 } | 1915 } |
1917 | 1916 |
1918 void RenderFrameImpl::OnCSSInsertRequest(const std::string& css) { | |
1919 frame_->document().insertStyleSheet(WebString::fromUTF8(css)); | |
1920 } | |
1921 | |
1922 void RenderFrameImpl::OnAddMessageToConsole(ConsoleMessageLevel level, | 1917 void RenderFrameImpl::OnAddMessageToConsole(ConsoleMessageLevel level, |
1923 const std::string& message) { | 1918 const std::string& message) { |
1924 AddMessageToConsole(level, message); | 1919 AddMessageToConsole(level, message); |
1925 } | 1920 } |
1926 | 1921 |
1927 void RenderFrameImpl::OnJavaScriptExecuteRequest( | 1922 void RenderFrameImpl::OnJavaScriptExecuteRequest( |
1928 const base::string16& jscript, | 1923 const base::string16& jscript, |
1929 int id, | 1924 int id, |
1930 bool notify_result) { | 1925 bool notify_result) { |
1931 TRACE_EVENT_INSTANT0("test_tracing", "OnJavaScriptExecuteRequest", | 1926 TRACE_EVENT_INSTANT0("test_tracing", "OnJavaScriptExecuteRequest", |
(...skipping 4402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6334 // event target. Potentially a Pepper plugin will receive the event. | 6329 // event target. Potentially a Pepper plugin will receive the event. |
6335 // In order to tell whether a plugin gets the last mouse event and which it | 6330 // In order to tell whether a plugin gets the last mouse event and which it |
6336 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6331 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6337 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6332 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6338 // |pepper_last_mouse_event_target_|. | 6333 // |pepper_last_mouse_event_target_|. |
6339 pepper_last_mouse_event_target_ = nullptr; | 6334 pepper_last_mouse_event_target_ = nullptr; |
6340 #endif | 6335 #endif |
6341 } | 6336 } |
6342 | 6337 |
6343 } // namespace content | 6338 } // namespace content |
OLD | NEW |