| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1553 void RenderViewHostImpl::ForwardKeyboardEvent( | 1553 void RenderViewHostImpl::ForwardKeyboardEvent( |
| 1554 const NativeWebKeyboardEvent& key_event) { | 1554 const NativeWebKeyboardEvent& key_event) { |
| 1555 if (ignore_input_events()) { | 1555 if (ignore_input_events()) { |
| 1556 if (key_event.type == WebInputEvent::RawKeyDown) | 1556 if (key_event.type == WebInputEvent::RawKeyDown) |
| 1557 delegate_->OnIgnoredUIEvent(); | 1557 delegate_->OnIgnoredUIEvent(); |
| 1558 return; | 1558 return; |
| 1559 } | 1559 } |
| 1560 RenderWidgetHostImpl::ForwardKeyboardEvent(key_event); | 1560 RenderWidgetHostImpl::ForwardKeyboardEvent(key_event); |
| 1561 } | 1561 } |
| 1562 | 1562 |
| 1563 #if defined(OS_MACOSX) | 1563 #if defined(OS_ANDROID) |
| 1564 void RenderViewHostImpl::DidSelectPopupMenuItem(int selected_index) { | 1564 void RenderViewHostImpl::AttachLayer(WebKit::WebLayer* layer) { |
| 1565 Send(new ViewMsg_SelectPopupMenuItem(GetRoutingID(), selected_index)); | 1565 delegate_->AttachLayer(layer); |
| 1566 } | 1566 } |
| 1567 | 1567 |
| 1568 void RenderViewHostImpl::DidCancelPopupMenu() { | 1568 void RenderViewHostImpl::RemoveLayer(WebKit::WebLayer* layer) { |
| 1569 Send(new ViewMsg_SelectPopupMenuItem(GetRoutingID(), -1)); | 1569 delegate_->RemoveLayer(layer); |
| 1570 } | 1570 } |
| 1571 #endif | |
| 1572 | |
| 1573 #if defined(OS_ANDROID) | |
| 1574 void RenderViewHostImpl::DidSelectPopupMenuItems( | 1571 void RenderViewHostImpl::DidSelectPopupMenuItems( |
| 1575 const std::vector<int>& selected_indices) { | 1572 const std::vector<int>& selected_indices) { |
| 1576 Send(new ViewMsg_SelectPopupMenuItems(GetRoutingID(), false, | 1573 Send(new ViewMsg_SelectPopupMenuItems(GetRoutingID(), false, |
| 1577 selected_indices)); | 1574 selected_indices)); |
| 1578 } | 1575 } |
| 1579 | 1576 |
| 1580 void RenderViewHostImpl::DidCancelPopupMenu() { | 1577 void RenderViewHostImpl::DidCancelPopupMenu() { |
| 1581 Send(new ViewMsg_SelectPopupMenuItems(GetRoutingID(), true, | 1578 Send(new ViewMsg_SelectPopupMenuItems(GetRoutingID(), true, |
| 1582 std::vector<int>())); | 1579 std::vector<int>())); |
| 1583 } | 1580 } |
| 1584 #endif | 1581 #endif |
| 1585 | 1582 |
| 1583 #if defined(OS_MACOSX) |
| 1584 void RenderViewHostImpl::DidSelectPopupMenuItem(int selected_index) { |
| 1585 Send(new ViewMsg_SelectPopupMenuItem(GetRoutingID(), selected_index)); |
| 1586 } |
| 1587 |
| 1588 void RenderViewHostImpl::DidCancelPopupMenu() { |
| 1589 Send(new ViewMsg_SelectPopupMenuItem(GetRoutingID(), -1)); |
| 1590 } |
| 1591 #endif |
| 1592 |
| 1586 void RenderViewHostImpl::SendOrientationChangeEvent(int orientation) { | 1593 void RenderViewHostImpl::SendOrientationChangeEvent(int orientation) { |
| 1587 Send(new ViewMsg_OrientationChangeEvent(GetRoutingID(), orientation)); | 1594 Send(new ViewMsg_OrientationChangeEvent(GetRoutingID(), orientation)); |
| 1588 } | 1595 } |
| 1589 | 1596 |
| 1590 void RenderViewHostImpl::ToggleSpeechInput() { | 1597 void RenderViewHostImpl::ToggleSpeechInput() { |
| 1591 Send(new InputTagSpeechMsg_ToggleSpeechInput(GetRoutingID())); | 1598 Send(new InputTagSpeechMsg_ToggleSpeechInput(GetRoutingID())); |
| 1592 } | 1599 } |
| 1593 | 1600 |
| 1594 void RenderViewHostImpl::FilterURL(ChildProcessSecurityPolicyImpl* policy, | 1601 void RenderViewHostImpl::FilterURL(ChildProcessSecurityPolicyImpl* policy, |
| 1595 int renderer_id, | 1602 int renderer_id, |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1893 // can cause navigations to be ignored in OnMsgNavigate. | 1900 // can cause navigations to be ignored in OnMsgNavigate. |
| 1894 is_waiting_for_beforeunload_ack_ = false; | 1901 is_waiting_for_beforeunload_ack_ = false; |
| 1895 is_waiting_for_unload_ack_ = false; | 1902 is_waiting_for_unload_ack_ = false; |
| 1896 } | 1903 } |
| 1897 | 1904 |
| 1898 void RenderViewHostImpl::ClearPowerSaveBlockers() { | 1905 void RenderViewHostImpl::ClearPowerSaveBlockers() { |
| 1899 STLDeleteValues(&power_save_blockers_); | 1906 STLDeleteValues(&power_save_blockers_); |
| 1900 } | 1907 } |
| 1901 | 1908 |
| 1902 } // namespace content | 1909 } // namespace content |
| OLD | NEW |