| 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 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1132 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) | 1132 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) |
| 1133 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) | 1133 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) |
| 1134 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, | 1134 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, |
| 1135 OnRequestDesktopNotificationPermission) | 1135 OnRequestDesktopNotificationPermission) |
| 1136 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, | 1136 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, |
| 1137 OnShowDesktopNotification) | 1137 OnShowDesktopNotification) |
| 1138 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, | 1138 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, |
| 1139 OnCancelDesktopNotification) | 1139 OnCancelDesktopNotification) |
| 1140 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1140 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 1141 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) | 1141 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup) |
| 1142 IPC_MESSAGE_HANDLER(ViewHostMsg_HidePopup, OnHidePopup) |
| 1142 #endif | 1143 #endif |
| 1143 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) | 1144 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) |
| 1144 IPC_MESSAGE_HANDLER(ViewHostMsg_DidAccessInitialDocument, | 1145 IPC_MESSAGE_HANDLER(ViewHostMsg_DidAccessInitialDocument, |
| 1145 OnDidAccessInitialDocument) | 1146 OnDidAccessInitialDocument) |
| 1146 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) | 1147 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) |
| 1147 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, | 1148 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, |
| 1148 OnAccessibilityLocationChanges) | 1149 OnAccessibilityLocationChanges) |
| 1149 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) | 1150 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) |
| 1150 // Have the super handle all other messages. | 1151 // Have the super handle all other messages. |
| 1151 IPC_MESSAGE_UNHANDLED( | 1152 IPC_MESSAGE_UNHANDLED( |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1886 if (view) { | 1887 if (view) { |
| 1887 view->ShowPopupMenu(params.bounds, | 1888 view->ShowPopupMenu(params.bounds, |
| 1888 params.item_height, | 1889 params.item_height, |
| 1889 params.item_font_size, | 1890 params.item_font_size, |
| 1890 params.selected_item, | 1891 params.selected_item, |
| 1891 params.popup_items, | 1892 params.popup_items, |
| 1892 params.right_aligned, | 1893 params.right_aligned, |
| 1893 params.allow_multiple_selection); | 1894 params.allow_multiple_selection); |
| 1894 } | 1895 } |
| 1895 } | 1896 } |
| 1897 |
| 1898 void RenderViewHostImpl::OnHidePopup() { |
| 1899 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); |
| 1900 if (view) |
| 1901 view->HidePopupMenu(); |
| 1902 } |
| 1896 #endif | 1903 #endif |
| 1897 | 1904 |
| 1898 void RenderViewHostImpl::SetState(RenderViewHostImplState rvh_state) { | 1905 void RenderViewHostImpl::SetState(RenderViewHostImplState rvh_state) { |
| 1899 // We update the number of RenderViews in a SiteInstance when the | 1906 // We update the number of RenderViews in a SiteInstance when the |
| 1900 // swapped out status of this RenderView gets flipped to/from live. | 1907 // swapped out status of this RenderView gets flipped to/from live. |
| 1901 if (!IsRVHStateActive(rvh_state_) && IsRVHStateActive(rvh_state)) | 1908 if (!IsRVHStateActive(rvh_state_) && IsRVHStateActive(rvh_state)) |
| 1902 instance_->increment_active_view_count(); | 1909 instance_->increment_active_view_count(); |
| 1903 else if (IsRVHStateActive(rvh_state_) && !IsRVHStateActive(rvh_state)) | 1910 else if (IsRVHStateActive(rvh_state_) && !IsRVHStateActive(rvh_state)) |
| 1904 instance_->decrement_active_view_count(); | 1911 instance_->decrement_active_view_count(); |
| 1905 | 1912 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1930 return true; | 1937 return true; |
| 1931 } | 1938 } |
| 1932 | 1939 |
| 1933 void RenderViewHostImpl::AttachToFrameTree() { | 1940 void RenderViewHostImpl::AttachToFrameTree() { |
| 1934 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1941 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 1935 | 1942 |
| 1936 frame_tree->ResetForMainFrameSwap(); | 1943 frame_tree->ResetForMainFrameSwap(); |
| 1937 } | 1944 } |
| 1938 | 1945 |
| 1939 } // namespace content | 1946 } // namespace content |
| OLD | NEW |