Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 1413543005: Use FrameTreeNode ID as frameId in extension APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve port lifetime management, add tests Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Helper function to determine whether the RFH state should contribute to the 111 // Helper function to determine whether the RFH state should contribute to the
112 // number of active frames of a SiteInstance or not. 112 // number of active frames of a SiteInstance or not.
113 static bool IsRFHStateActive(RenderFrameHostImplState rfh_state); 113 static bool IsRFHStateActive(RenderFrameHostImplState rfh_state);
114 114
115 // An accessibility reset is only allowed to prevent very rare corner cases 115 // An accessibility reset is only allowed to prevent very rare corner cases
116 // or race conditions where the browser and renderer get out of sync. If 116 // or race conditions where the browser and renderer get out of sync. If
117 // this happens more than this many times, kill the renderer. 117 // this happens more than this many times, kill the renderer.
118 static const int kMaxAccessibilityResets = 5; 118 static const int kMaxAccessibilityResets = 5;
119 119
120 static RenderFrameHostImpl* FromID(int process_id, int routing_id); 120 static RenderFrameHostImpl* FromID(int process_id, int routing_id);
121 static RenderFrameHostImpl* FromFrameTreeNodeID(int frame_tree_node_id);
121 static RenderFrameHostImpl* FromAXTreeID( 122 static RenderFrameHostImpl* FromAXTreeID(
122 AXTreeIDRegistry::AXTreeID ax_tree_id); 123 AXTreeIDRegistry::AXTreeID ax_tree_id);
123 124
124 ~RenderFrameHostImpl() override; 125 ~RenderFrameHostImpl() override;
125 126
126 // RenderFrameHost 127 // RenderFrameHost
127 int GetRoutingID() override; 128 int GetRoutingID() override;
128 AXTreeIDRegistry::AXTreeID GetAXTreeID() override; 129 AXTreeIDRegistry::AXTreeID GetAXTreeID() override;
129 SiteInstanceImpl* GetSiteInstance() override; 130 SiteInstanceImpl* GetSiteInstance() override;
130 RenderProcessHost* GetProcess() override; 131 RenderProcessHost* GetProcess() override;
131 RenderFrameHost* GetParent() override; 132 RenderFrameHost* GetParent() override;
133 RenderFrameHost* FindByFrameTreeNodeID(int frame_tree_node_id) override;
134 int GetFrameTreeNodeID() override;
132 const std::string& GetFrameName() override; 135 const std::string& GetFrameName() override;
133 bool IsCrossProcessSubframe() override; 136 bool IsCrossProcessSubframe() override;
134 GURL GetLastCommittedURL() override; 137 GURL GetLastCommittedURL() override;
135 gfx::NativeView GetNativeView() override; 138 gfx::NativeView GetNativeView() override;
136 void AddMessageToConsole(ConsoleMessageLevel level, 139 void AddMessageToConsole(ConsoleMessageLevel level,
137 const std::string& message) override; 140 const std::string& message) override;
138 void ExecuteJavaScript(const base::string16& javascript) override; 141 void ExecuteJavaScript(const base::string16& javascript) override;
139 void ExecuteJavaScript(const base::string16& javascript, 142 void ExecuteJavaScript(const base::string16& javascript,
140 const JavaScriptResultCallback& callback) override; 143 const JavaScriptResultCallback& callback) override;
141 void ExecuteJavaScriptForTests(const base::string16& javascript) override; 144 void ExecuteJavaScriptForTests(const base::string16& javascript) override;
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 795
793 // NOTE: This must be the last member. 796 // NOTE: This must be the last member.
794 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 797 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
795 798
796 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 799 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
797 }; 800 };
798 801
799 } // namespace content 802 } // namespace content
800 803
801 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 804 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698