| 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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) | 1127 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) |
| 1128 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) | 1128 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) |
| 1129 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, | 1129 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, |
| 1130 OnRequestDesktopNotificationPermission) | 1130 OnRequestDesktopNotificationPermission) |
| 1131 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, | 1131 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, |
| 1132 OnShowDesktopNotification) | 1132 OnShowDesktopNotification) |
| 1133 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, | 1133 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, |
| 1134 OnCancelDesktopNotification) | 1134 OnCancelDesktopNotification) |
| 1135 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1135 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 1136 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) | 1136 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) |
| 1137 IPC_MESSAGE_HANDLER(ViewHostMsg_HidePopup, OnHidePopup) |
| 1137 #endif | 1138 #endif |
| 1138 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) | 1139 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) |
| 1139 IPC_MESSAGE_HANDLER(ViewHostMsg_DidAccessInitialDocument, | 1140 IPC_MESSAGE_HANDLER(ViewHostMsg_DidAccessInitialDocument, |
| 1140 OnDidAccessInitialDocument) | 1141 OnDidAccessInitialDocument) |
| 1141 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) | 1142 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) |
| 1142 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, | 1143 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, |
| 1143 OnAccessibilityLocationChanges) | 1144 OnAccessibilityLocationChanges) |
| 1144 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) | 1145 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) |
| 1145 // Have the super handle all other messages. | 1146 // Have the super handle all other messages. |
| 1146 IPC_MESSAGE_UNHANDLED( | 1147 IPC_MESSAGE_UNHANDLED( |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1833 if (view) { | 1834 if (view) { |
| 1834 view->ShowPopupMenu(params.bounds, | 1835 view->ShowPopupMenu(params.bounds, |
| 1835 params.item_height, | 1836 params.item_height, |
| 1836 params.item_font_size, | 1837 params.item_font_size, |
| 1837 params.selected_item, | 1838 params.selected_item, |
| 1838 params.popup_items, | 1839 params.popup_items, |
| 1839 params.right_aligned, | 1840 params.right_aligned, |
| 1840 params.allow_multiple_selection); | 1841 params.allow_multiple_selection); |
| 1841 } | 1842 } |
| 1842 } | 1843 } |
| 1844 |
| 1845 void RenderViewHostImpl::OnHidePopup() { |
| 1846 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); |
| 1847 if (view) |
| 1848 view->HidePopupMenu(); |
| 1849 } |
| 1843 #endif | 1850 #endif |
| 1844 | 1851 |
| 1845 void RenderViewHostImpl::SetState(RenderViewHostImplState rvh_state) { | 1852 void RenderViewHostImpl::SetState(RenderViewHostImplState rvh_state) { |
| 1846 // We update the number of RenderViews in a SiteInstance when the | 1853 // We update the number of RenderViews in a SiteInstance when the |
| 1847 // swapped out status of this RenderView gets flipped to/from live. | 1854 // swapped out status of this RenderView gets flipped to/from live. |
| 1848 if (!IsRVHStateActive(rvh_state_) && IsRVHStateActive(rvh_state)) | 1855 if (!IsRVHStateActive(rvh_state_) && IsRVHStateActive(rvh_state)) |
| 1849 instance_->increment_active_view_count(); | 1856 instance_->increment_active_view_count(); |
| 1850 else if (IsRVHStateActive(rvh_state_) && !IsRVHStateActive(rvh_state)) | 1857 else if (IsRVHStateActive(rvh_state_) && !IsRVHStateActive(rvh_state)) |
| 1851 instance_->decrement_active_view_count(); | 1858 instance_->decrement_active_view_count(); |
| 1852 | 1859 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1877 return true; | 1884 return true; |
| 1878 } | 1885 } |
| 1879 | 1886 |
| 1880 void RenderViewHostImpl::AttachToFrameTree() { | 1887 void RenderViewHostImpl::AttachToFrameTree() { |
| 1881 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1888 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 1882 | 1889 |
| 1883 frame_tree->ResetForMainFrameSwap(); | 1890 frame_tree->ResetForMainFrameSwap(); |
| 1884 } | 1891 } |
| 1885 | 1892 |
| 1886 } // namespace content | 1893 } // namespace content |
| OLD | NEW |