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 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 focused_pepper_plugin_->HandleCompositionEnd(text); | 1474 focused_pepper_plugin_->HandleCompositionEnd(text); |
1475 focused_pepper_plugin_->HandleTextInput(text); | 1475 focused_pepper_plugin_->HandleTextInput(text); |
1476 } | 1476 } |
1477 pepper_composition_text_.clear(); | 1477 pepper_composition_text_.clear(); |
1478 } | 1478 } |
1479 #endif // defined(ENABLE_PLUGINS) | 1479 #endif // defined(ENABLE_PLUGINS) |
1480 | 1480 |
1481 MediaStreamDispatcher* RenderFrameImpl::GetMediaStreamDispatcher() { | 1481 MediaStreamDispatcher* RenderFrameImpl::GetMediaStreamDispatcher() { |
1482 if (!web_user_media_client_) | 1482 if (!web_user_media_client_) |
1483 InitializeUserMediaClient(); | 1483 InitializeUserMediaClient(); |
1484 return web_user_media_client_ ? | 1484 return web_user_media_client_ |
1485 web_user_media_client_->media_stream_dispatcher() : NULL; | 1485 ? web_user_media_client_->media_stream_dispatcher() |
| 1486 : nullptr; |
| 1487 } |
| 1488 |
| 1489 void RenderFrameImpl::ScriptedPrint(bool user_initiated) { |
| 1490 for (auto& observer : observers_) |
| 1491 observer.ScriptedPrint(user_initiated); |
1486 } | 1492 } |
1487 | 1493 |
1488 bool RenderFrameImpl::Send(IPC::Message* message) { | 1494 bool RenderFrameImpl::Send(IPC::Message* message) { |
1489 return RenderThread::Get()->Send(message); | 1495 return RenderThread::Get()->Send(message); |
1490 } | 1496 } |
1491 | 1497 |
1492 #if defined(USE_EXTERNAL_POPUP_MENU) | 1498 #if defined(USE_EXTERNAL_POPUP_MENU) |
1493 void RenderFrameImpl::DidHideExternalPopupMenu() { | 1499 void RenderFrameImpl::DidHideExternalPopupMenu() { |
1494 // We need to clear external_popup_menu_ as soon as ExternalPopupMenu::close | 1500 // We need to clear external_popup_menu_ as soon as ExternalPopupMenu::close |
1495 // is called. Otherwise, createExternalPopupMenu() for new popup will fail. | 1501 // is called. Otherwise, createExternalPopupMenu() for new popup will fail. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1529 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate) | 1535 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate) |
1530 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload) | 1536 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload) |
1531 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) | 1537 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) |
1532 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame) | 1538 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame) |
1533 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop) | 1539 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop) |
1534 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed) | 1540 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed) |
1535 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction, | 1541 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction, |
1536 OnCustomContextMenuAction) | 1542 OnCustomContextMenuAction) |
1537 #if defined(ENABLE_PLUGINS) | 1543 #if defined(ENABLE_PLUGINS) |
1538 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume) | 1544 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume) |
1539 #endif // defined(ENABLE_PLUGINS) | 1545 #endif |
1540 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo) | 1546 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo) |
1541 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo) | 1547 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo) |
1542 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut) | 1548 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut) |
1543 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy) | 1549 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy) |
1544 IPC_MESSAGE_HANDLER(InputMsg_Paste, OnPaste) | 1550 IPC_MESSAGE_HANDLER(InputMsg_Paste, OnPaste) |
1545 IPC_MESSAGE_HANDLER(InputMsg_PasteAndMatchStyle, OnPasteAndMatchStyle) | 1551 IPC_MESSAGE_HANDLER(InputMsg_PasteAndMatchStyle, OnPasteAndMatchStyle) |
1546 IPC_MESSAGE_HANDLER(InputMsg_Delete, OnDelete) | 1552 IPC_MESSAGE_HANDLER(InputMsg_Delete, OnDelete) |
1547 IPC_MESSAGE_HANDLER(InputMsg_SelectAll, OnSelectAll) | 1553 IPC_MESSAGE_HANDLER(InputMsg_SelectAll, OnSelectAll) |
1548 IPC_MESSAGE_HANDLER(InputMsg_SelectRange, OnSelectRange) | 1554 IPC_MESSAGE_HANDLER(InputMsg_SelectRange, OnSelectRange) |
1549 IPC_MESSAGE_HANDLER(InputMsg_AdjustSelectionByCharacterOffset, | 1555 IPC_MESSAGE_HANDLER(InputMsg_AdjustSelectionByCharacterOffset, |
(...skipping 5078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6628 // event target. Potentially a Pepper plugin will receive the event. | 6634 // event target. Potentially a Pepper plugin will receive the event. |
6629 // In order to tell whether a plugin gets the last mouse event and which it | 6635 // In order to tell whether a plugin gets the last mouse event and which it |
6630 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6636 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6631 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6637 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6632 // |pepper_last_mouse_event_target_|. | 6638 // |pepper_last_mouse_event_target_|. |
6633 pepper_last_mouse_event_target_ = nullptr; | 6639 pepper_last_mouse_event_target_ = nullptr; |
6634 #endif | 6640 #endif |
6635 } | 6641 } |
6636 | 6642 |
6637 } // namespace content | 6643 } // namespace content |
OLD | NEW |