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/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
323 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) | 323 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) |
324 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, | 324 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, |
325 OnBeginNavigation) | 325 OnBeginNavigation) |
326 IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse, | 326 IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse, |
327 OnTextSurroundingSelectionResponse) | 327 OnTextSurroundingSelectionResponse) |
328 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) | 328 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) |
329 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, | 329 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, |
330 OnAccessibilityLocationChanges) | 330 OnAccessibilityLocationChanges) |
331 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_FindInPageResult, | 331 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_FindInPageResult, |
332 OnAccessibilityFindInPageResult) | 332 OnAccessibilityFindInPageResult) |
333 IPC_MESSAGE_HANDLER(FrameHostMsg_ToggleFullscreen, OnToggleFullscreen) | |
333 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 334 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
334 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) | 335 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) |
335 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) | 336 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) |
336 #endif | 337 #endif |
337 IPC_END_MESSAGE_MAP() | 338 IPC_END_MESSAGE_MAP() |
338 | 339 |
339 // No further actions here, since we may have been deleted. | 340 // No further actions here, since we may have been deleted. |
340 return handled; | 341 return handled; |
341 } | 342 } |
342 | 343 |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1104 BrowserAccessibilityManager* manager = | 1105 BrowserAccessibilityManager* manager = |
1105 GetOrCreateBrowserAccessibilityManager(); | 1106 GetOrCreateBrowserAccessibilityManager(); |
1106 if (manager) { | 1107 if (manager) { |
1107 manager->OnFindInPageResult( | 1108 manager->OnFindInPageResult( |
1108 params.request_id, params.match_index, params.start_id, | 1109 params.request_id, params.match_index, params.start_id, |
1109 params.start_offset, params.end_id, params.end_offset); | 1110 params.start_offset, params.end_id, params.end_offset); |
1110 } | 1111 } |
1111 } | 1112 } |
1112 } | 1113 } |
1113 | 1114 |
1115 void RenderFrameHostImpl::OnToggleFullscreen(bool enter_fullscreen) { | |
1116 DCHECK_CURRENTLY_ON(BrowserThread::UI); | |
Charlie Reis
2014/12/10 00:51:21
nit: This whole class is on the UI thread, so we d
mlamouri (slow - plz ping)
2014/12/10 15:47:02
Done.
mlamouri (slow - plz ping)
2014/12/10 15:47:02
Done.
| |
1117 | |
1118 if (enter_fullscreen) | |
1119 render_view_host_->EnterFullscreen(GetLastCommittedURL().GetOrigin()); | |
1120 else | |
1121 render_view_host_->ExitFullscreen(); | |
1122 } | |
1123 | |
1114 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1124 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
1115 void RenderFrameHostImpl::OnShowPopup( | 1125 void RenderFrameHostImpl::OnShowPopup( |
1116 const FrameHostMsg_ShowPopup_Params& params) { | 1126 const FrameHostMsg_ShowPopup_Params& params) { |
1117 RenderViewHostDelegateView* view = | 1127 RenderViewHostDelegateView* view = |
1118 render_view_host_->delegate_->GetDelegateView(); | 1128 render_view_host_->delegate_->GetDelegateView(); |
1119 if (view) { | 1129 if (view) { |
1120 view->ShowPopupMenu(this, | 1130 view->ShowPopupMenu(this, |
1121 params.bounds, | 1131 params.bounds, |
1122 params.item_height, | 1132 params.item_height, |
1123 params.item_font_size, | 1133 params.item_font_size, |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1576 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1586 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
1577 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1587 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
1578 GetContentClient()->browser()->RegisterPermissionUsage( | 1588 GetContentClient()->browser()->RegisterPermissionUsage( |
1579 PERMISSION_GEOLOCATION, | 1589 PERMISSION_GEOLOCATION, |
1580 delegate_->GetAsWebContents(), | 1590 delegate_->GetAsWebContents(), |
1581 GetLastCommittedURL().GetOrigin(), | 1591 GetLastCommittedURL().GetOrigin(), |
1582 top_frame->GetLastCommittedURL().GetOrigin()); | 1592 top_frame->GetLastCommittedURL().GetOrigin()); |
1583 } | 1593 } |
1584 | 1594 |
1585 } // namespace content | 1595 } // namespace content |
OLD | NEW |