OLD | NEW |
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 CHROME_BROWSER_TAB_CONTENTS_TAB_UTIL_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_UTIL_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_UTIL_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_UTIL_H_ |
7 | 7 |
8 class GURL; | 8 class GURL; |
9 class Profile; | 9 class Profile; |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 class SiteInstance; | 12 class SiteInstance; |
13 class WebContents; | 13 class WebContents; |
14 } | 14 } |
15 | 15 |
16 namespace tab_util { | 16 namespace tab_util { |
17 | 17 |
18 // Helper to find the WebContents that originated the given request. Can be | 18 // Helper to find the WebContents that originated the given request. Can be |
19 // NULL if the tab has been closed or some other error occurs. | 19 // NULL if the tab has been closed or some other error occurs. |
20 // Should only be called from the UI thread, since it accesses WebContents. | 20 // Should only be called from the UI thread, since it accesses WebContents. |
21 content::WebContents* GetWebContentsByID(int render_process_id, | 21 content::WebContents* GetWebContentsByID(int render_process_id, |
22 int render_view_id); | 22 int render_view_id); |
23 | 23 |
| 24 content::WebContents* GetWebContentsByFrameID(int render_process_id, |
| 25 int render_frame_id); |
| 26 |
24 // Returns a new SiteInstance for WebUI and app URLs. Returns NULL otherwise. | 27 // Returns a new SiteInstance for WebUI and app URLs. Returns NULL otherwise. |
25 content::SiteInstance* GetSiteInstanceForNewTab( | 28 content::SiteInstance* GetSiteInstanceForNewTab( |
26 Profile* profile, | 29 Profile* profile, |
27 const GURL& url); | 30 const GURL& url); |
28 | 31 |
29 } // namespace tab_util | 32 } // namespace tab_util |
30 | 33 |
31 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_UTIL_H_ | 34 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_UTIL_H_ |
OLD | NEW |