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 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 CREATE_RF_SWAPPED_OUT = 1 << 0, | 83 CREATE_RF_SWAPPED_OUT = 1 << 0, |
84 // The RenderFrame is initially hidden. | 84 // The RenderFrame is initially hidden. |
85 CREATE_RF_HIDDEN = 1 << 1, | 85 CREATE_RF_HIDDEN = 1 << 1, |
86 }; | 86 }; |
87 | 87 |
88 class CONTENT_EXPORT RenderFrameHostImpl | 88 class CONTENT_EXPORT RenderFrameHostImpl |
89 : public RenderFrameHost, | 89 : public RenderFrameHost, |
90 public BrowserAccessibilityDelegate { | 90 public BrowserAccessibilityDelegate { |
91 public: | 91 public: |
92 using AXTreeSnapshotCallback = | 92 using AXTreeSnapshotCallback = |
93 base::Callback<void(const ui::AXTreeUpdate<ui::AXNodeData>&)>; | 93 base::Callback<void( |
| 94 const ui::AXTreeUpdate&)>; |
94 | 95 |
95 // Keeps track of the state of the RenderFrameHostImpl, particularly with | 96 // Keeps track of the state of the RenderFrameHostImpl, particularly with |
96 // respect to swap out. | 97 // respect to swap out. |
97 enum RenderFrameHostImplState { | 98 enum RenderFrameHostImplState { |
98 // The standard state for a RFH handling the communication with an active | 99 // The standard state for a RFH handling the communication with an active |
99 // RenderFrame. | 100 // RenderFrame. |
100 STATE_DEFAULT = 0, | 101 STATE_DEFAULT = 0, |
101 // The RFH has not received the SwapOutACK yet, but the new page has | 102 // The RFH has not received the SwapOutACK yet, but the new page has |
102 // committed in a different RFH. Upon reception of the SwapOutACK, the RFH | 103 // committed in a different RFH. Upon reception of the SwapOutACK, the RFH |
103 // will either enter STATE_SWAPPED_OUT (if it is a main frame and there are | 104 // will either enter STATE_SWAPPED_OUT (if it is a main frame and there are |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 void OnDispatchLoad(); | 552 void OnDispatchLoad(); |
552 void OnAccessibilityEvents( | 553 void OnAccessibilityEvents( |
553 const std::vector<AccessibilityHostMsg_EventParams>& params, | 554 const std::vector<AccessibilityHostMsg_EventParams>& params, |
554 int reset_token); | 555 int reset_token); |
555 void OnAccessibilityLocationChanges( | 556 void OnAccessibilityLocationChanges( |
556 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params); | 557 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params); |
557 void OnAccessibilityFindInPageResult( | 558 void OnAccessibilityFindInPageResult( |
558 const AccessibilityHostMsg_FindInPageResultParams& params); | 559 const AccessibilityHostMsg_FindInPageResultParams& params); |
559 void OnAccessibilitySnapshotResponse( | 560 void OnAccessibilitySnapshotResponse( |
560 int callback_id, | 561 int callback_id, |
561 const ui::AXTreeUpdate<AXContentNodeData>& snapshot); | 562 const AXContentTreeUpdate& snapshot); |
562 void OnToggleFullscreen(bool enter_fullscreen); | 563 void OnToggleFullscreen(bool enter_fullscreen); |
563 void OnDidStartLoading(bool to_different_document); | 564 void OnDidStartLoading(bool to_different_document); |
564 void OnDidStopLoading(); | 565 void OnDidStopLoading(); |
565 void OnDidChangeLoadProgress(double load_progress); | 566 void OnDidChangeLoadProgress(double load_progress); |
566 | 567 |
567 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 568 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
568 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); | 569 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); |
569 void OnHidePopup(); | 570 void OnHidePopup(); |
570 #endif | 571 #endif |
571 | 572 |
(...skipping 30 matching lines...) Expand all Loading... |
602 | 603 |
603 // Map a browser plugin instance ID to the AXTreeID of the plugin's | 604 // Map a browser plugin instance ID to the AXTreeID of the plugin's |
604 // main frame. | 605 // main frame. |
605 AXTreeIDRegistry::AXTreeID BrowserPluginInstanceIDToAXTreeID(int routing_id); | 606 AXTreeIDRegistry::AXTreeID BrowserPluginInstanceIDToAXTreeID(int routing_id); |
606 | 607 |
607 // Convert the content-layer-specific AXContentNodeData to a general-purpose | 608 // Convert the content-layer-specific AXContentNodeData to a general-purpose |
608 // AXNodeData structure. | 609 // AXNodeData structure. |
609 void AXContentNodeDataToAXNodeData(const AXContentNodeData& src, | 610 void AXContentNodeDataToAXNodeData(const AXContentNodeData& src, |
610 ui::AXNodeData* dst); | 611 ui::AXNodeData* dst); |
611 | 612 |
| 613 // Convert the content-layer-specific AXContentTreeData to a general-purpose |
| 614 // AXTreeData structure. |
| 615 void AXContentTreeDataToAXTreeData(const AXContentTreeData& src, |
| 616 ui::AXTreeData* dst); |
| 617 |
612 // Returns the RenderWidgetHostView used for accessibility. For subframes, | 618 // Returns the RenderWidgetHostView used for accessibility. For subframes, |
613 // this function will return the platform view on the main frame; for main | 619 // this function will return the platform view on the main frame; for main |
614 // frames, it will return the current frame's view. | 620 // frames, it will return the current frame's view. |
615 RenderWidgetHostViewBase* GetViewForAccessibility(); | 621 RenderWidgetHostViewBase* GetViewForAccessibility(); |
616 | 622 |
617 // Sends a navigate message to the RenderFrame and notifies DevTools about | 623 // Sends a navigate message to the RenderFrame and notifies DevTools about |
618 // navigation happening. Should be used instead of sending the message | 624 // navigation happening. Should be used instead of sending the message |
619 // directly. | 625 // directly. |
620 void SendNavigateMessage( | 626 void SendNavigateMessage( |
621 const content::CommonNavigationParams& common_params, | 627 const content::CommonNavigationParams& common_params, |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 | 798 |
793 // NOTE: This must be the last member. | 799 // NOTE: This must be the last member. |
794 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 800 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
795 | 801 |
796 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 802 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
797 }; | 803 }; |
798 | 804 |
799 } // namespace content | 805 } // namespace content |
800 | 806 |
801 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 807 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |