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

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: Charlie's nits (#33) Created 5 years 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Return the currently active RenderProcessHost and RenderViewHost. Each of 205 // Return the currently active RenderProcessHost and RenderViewHost. Each of
206 // these may change over time. 206 // these may change over time.
207 virtual RenderProcessHost* GetRenderProcessHost() const = 0; 207 virtual RenderProcessHost* GetRenderProcessHost() const = 0;
208 208
209 // Returns the main frame for the currently active view. 209 // Returns the main frame for the currently active view.
210 virtual RenderFrameHost* GetMainFrame() = 0; 210 virtual RenderFrameHost* GetMainFrame() = 0;
211 211
212 // Returns the focused frame for the currently active view. 212 // Returns the focused frame for the currently active view.
213 virtual RenderFrameHost* GetFocusedFrame() = 0; 213 virtual RenderFrameHost* GetFocusedFrame() = 0;
214 214
215 // Returns the current RenderFrameHost for a given FrameTreeNode ID if it is
216 // part of this tab. See RenderFrameHost::GetFrameTreeNodeId for documentation
217 // on this ID.
218 virtual RenderFrameHost* FindFrameByFrameTreeNodeId(
219 int frame_tree_node_id) = 0;
220
215 // Calls |on_frame| for each frame in the currently active view. 221 // Calls |on_frame| for each frame in the currently active view.
216 // Note: The RenderFrameHost parameter is not guaranteed to have a live 222 // Note: The RenderFrameHost parameter is not guaranteed to have a live
217 // RenderFrame counterpart in the renderer process. Callbacks should check 223 // RenderFrame counterpart in the renderer process. Callbacks should check
218 // IsRenderFrameLive, as sending IPC messages to it in this case will fail 224 // IsRenderFrameLive, as sending IPC messages to it in this case will fail
219 // silently. 225 // silently.
220 virtual void ForEachFrame( 226 virtual void ForEachFrame(
221 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0; 227 const base::Callback<void(RenderFrameHost*)>& on_frame) = 0;
222 228
223 // Sends the given IPC to all frames in the currently active view. This is a 229 // Sends the given IPC to all frames in the currently active view. This is a
224 // convenience method instead of calling ForEach. 230 // convenience method instead of calling ForEach.
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 706
701 private: 707 private:
702 // This interface should only be implemented inside content. 708 // This interface should only be implemented inside content.
703 friend class WebContentsImpl; 709 friend class WebContentsImpl;
704 WebContents() {} 710 WebContents() {}
705 }; 711 };
706 712
707 } // namespace content 713 } // namespace content
708 714
709 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 715 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698