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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // used as a placeholder to allow cross-process communication. Only main | 88 // used as a placeholder to allow cross-process communication. Only main |
89 // frames can enter this state. | 89 // frames can enter this state. |
90 STATE_SWAPPED_OUT, | 90 STATE_SWAPPED_OUT, |
91 }; | 91 }; |
92 // Helper function to determine whether the RFH state should contribute to the | 92 // Helper function to determine whether the RFH state should contribute to the |
93 // number of active frames of a SiteInstance or not. | 93 // number of active frames of a SiteInstance or not. |
94 static bool IsRFHStateActive(RenderFrameHostImplState rfh_state); | 94 static bool IsRFHStateActive(RenderFrameHostImplState rfh_state); |
95 | 95 |
96 static RenderFrameHostImpl* FromID(int process_id, int routing_id); | 96 static RenderFrameHostImpl* FromID(int process_id, int routing_id); |
97 | 97 |
98 virtual ~RenderFrameHostImpl(); | 98 ~RenderFrameHostImpl() override; |
99 | 99 |
100 // RenderFrameHost | 100 // RenderFrameHost |
101 virtual int GetRoutingID() override; | 101 int GetRoutingID() override; |
102 virtual SiteInstanceImpl* GetSiteInstance() override; | 102 SiteInstanceImpl* GetSiteInstance() override; |
103 virtual RenderProcessHost* GetProcess() override; | 103 RenderProcessHost* GetProcess() override; |
104 virtual RenderFrameHost* GetParent() override; | 104 RenderFrameHost* GetParent() override; |
105 virtual const std::string& GetFrameName() override; | 105 const std::string& GetFrameName() override; |
106 virtual bool IsCrossProcessSubframe() override; | 106 bool IsCrossProcessSubframe() override; |
107 virtual GURL GetLastCommittedURL() override; | 107 GURL GetLastCommittedURL() override; |
108 virtual gfx::NativeView GetNativeView() override; | 108 gfx::NativeView GetNativeView() override; |
109 virtual void ExecuteJavaScript( | 109 void ExecuteJavaScript(const base::string16& javascript) override; |
110 const base::string16& javascript) override; | 110 void ExecuteJavaScript(const base::string16& javascript, |
111 virtual void ExecuteJavaScript( | 111 const JavaScriptResultCallback& callback) override; |
112 const base::string16& javascript, | 112 void ExecuteJavaScriptForTests(const base::string16& javascript) override; |
113 const JavaScriptResultCallback& callback) override; | 113 RenderViewHost* GetRenderViewHost() override; |
114 virtual void ExecuteJavaScriptForTests( | 114 ServiceRegistry* GetServiceRegistry() override; |
115 const base::string16& javascript) override; | |
116 virtual RenderViewHost* GetRenderViewHost() override; | |
117 virtual ServiceRegistry* GetServiceRegistry() override; | |
118 | 115 |
119 // IPC::Sender | 116 // IPC::Sender |
120 virtual bool Send(IPC::Message* msg) override; | 117 bool Send(IPC::Message* msg) override; |
121 | 118 |
122 // IPC::Listener | 119 // IPC::Listener |
123 virtual bool OnMessageReceived(const IPC::Message& msg) override; | 120 bool OnMessageReceived(const IPC::Message& msg) override; |
124 | 121 |
125 // BrowserAccessibilityDelegate | 122 // BrowserAccessibilityDelegate |
126 virtual void AccessibilitySetFocus(int acc_obj_id) override; | 123 void AccessibilitySetFocus(int acc_obj_id) override; |
127 virtual void AccessibilityDoDefaultAction(int acc_obj_id) override; | 124 void AccessibilityDoDefaultAction(int acc_obj_id) override; |
128 virtual void AccessibilityShowMenu(const gfx::Point& global_point) override; | 125 void AccessibilityShowMenu(const gfx::Point& global_point) override; |
129 virtual void AccessibilityScrollToMakeVisible( | 126 void AccessibilityScrollToMakeVisible(int acc_obj_id, |
130 int acc_obj_id, const gfx::Rect& subfocus) override; | 127 const gfx::Rect& subfocus) override; |
131 virtual void AccessibilityScrollToPoint( | 128 void AccessibilityScrollToPoint(int acc_obj_id, |
132 int acc_obj_id, const gfx::Point& point) override; | 129 const gfx::Point& point) override; |
133 virtual void AccessibilitySetTextSelection( | 130 void AccessibilitySetTextSelection(int acc_obj_id, |
134 int acc_obj_id, int start_offset, int end_offset) override; | 131 int start_offset, |
135 virtual bool AccessibilityViewHasFocus() const override; | 132 int end_offset) override; |
136 virtual gfx::Rect AccessibilityGetViewBounds() const override; | 133 bool AccessibilityViewHasFocus() const override; |
137 virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) | 134 gfx::Rect AccessibilityGetViewBounds() const override; |
138 const override; | 135 gfx::Point AccessibilityOriginInScreen( |
139 virtual void AccessibilityHitTest(const gfx::Point& point) override; | 136 const gfx::Rect& bounds) const override; |
140 virtual void AccessibilityFatalError() override; | 137 void AccessibilityHitTest(const gfx::Point& point) override; |
141 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override; | 138 void AccessibilityFatalError() override; |
142 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() | 139 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override; |
143 override; | 140 gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() override; |
144 virtual BrowserAccessibilityManager* AccessibilityGetChildFrame( | 141 BrowserAccessibilityManager* AccessibilityGetChildFrame( |
145 int accessibility_node_id) override; | 142 int accessibility_node_id) override; |
146 virtual BrowserAccessibility* AccessibilityGetParentFrame() override; | 143 BrowserAccessibility* AccessibilityGetParentFrame() override; |
147 | 144 |
148 // Creates a RenderFrame in the renderer process. Only called for | 145 // Creates a RenderFrame in the renderer process. Only called for |
149 // cross-process subframe navigations in --site-per-process. | 146 // cross-process subframe navigations in --site-per-process. |
150 bool CreateRenderFrame(int parent_routing_id); | 147 bool CreateRenderFrame(int parent_routing_id); |
151 | 148 |
152 // Returns whether the RenderFrame in the renderer process has been created | 149 // Returns whether the RenderFrame in the renderer process has been created |
153 // and still has a connection. This is valid for all frames. | 150 // and still has a connection. This is valid for all frames. |
154 bool IsRenderFrameLive(); | 151 bool IsRenderFrameLive(); |
155 | 152 |
156 // Tracks whether the RenderFrame for this RenderFrameHost has been created in | 153 // Tracks whether the RenderFrame for this RenderFrameHost has been created in |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 | 567 |
571 // NOTE: This must be the last member. | 568 // NOTE: This must be the last member. |
572 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 569 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
573 | 570 |
574 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 571 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
575 }; | 572 }; |
576 | 573 |
577 } // namespace content | 574 } // namespace content |
578 | 575 |
579 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 576 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |