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

Side by Side Diff: content/public/browser/web_contents.h

Issue 1413543005: Use FrameTreeNode ID as frameId in extension APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments, add WebNavigationApiTest.CrossProcessIframe test 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 (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 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // Return the currently active RenderProcessHost and RenderViewHost. Each of 204 // Return the currently active RenderProcessHost and RenderViewHost. Each of
205 // these may change over time. 205 // these may change over time.
206 virtual RenderProcessHost* GetRenderProcessHost() const = 0; 206 virtual RenderProcessHost* GetRenderProcessHost() const = 0;
207 207
208 // Returns the main frame for the currently active view. 208 // Returns the main frame for the currently active view.
209 virtual RenderFrameHost* GetMainFrame() = 0; 209 virtual RenderFrameHost* GetMainFrame() = 0;
210 210
211 // Returns the focused frame for the currently active view. 211 // Returns the focused frame for the currently active view.
212 virtual RenderFrameHost* GetFocusedFrame() = 0; 212 virtual RenderFrameHost* GetFocusedFrame() = 0;
213 213
214 // Returns the current RenderFrameHost for a given FrameTreeNode ID if it is
215 // part of this tab.
216 virtual RenderFrameHost* FindByFrameTreeNodeID(int frame_tree_node_id) = 0;
Charlie Reis 2015/11/03 00:23:49 nit: FindFrameByFrameTreeNodeID (Otherwise FindBy
robwu 2015/11/03 10:03:02 Done.
217
214 // Calls |on_frame| for each frame in the currently active view. 218 // Calls |on_frame| for each frame in the currently active view.
215 // Note: The RenderFrameHost parameter is not guaranteed to have a live 219 // Note: The RenderFrameHost parameter is not guaranteed to have a live
216 // RenderFrame counterpart in the renderer process. Callbacks should check 220 // RenderFrame counterpart in the renderer process. Callbacks should check
217 // IsRenderFrameLive, as sending IPC messages to it in this case will fail 221 // IsRenderFrameLive, as sending IPC messages to it in this case will fail
218 // silently. 222 // silently.
219 virtual void ForEachFrame( 223 virtual void ForEachFrame(
220 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0; 224 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0;
221 225
222 // Sends the given IPC to all frames in the currently active view. This is a 226 // Sends the given IPC to all frames in the currently active view. This is a
223 // convenience method instead of calling ForEach. 227 // convenience method instead of calling ForEach.
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 705
702 private: 706 private:
703 // This interface should only be implemented inside content. 707 // This interface should only be implemented inside content.
704 friend class WebContentsImpl; 708 friend class WebContentsImpl;
705 WebContents() {} 709 WebContents() {}
706 }; 710 };
707 711
708 } // namespace content 712 } // namespace content
709 713
710 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 714 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698