OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 class GURL; | |
10 class Profile; | |
11 class SiteInstance; | |
9 class TabContents; | 12 class TabContents; |
10 | 13 |
11 namespace tab_util { | 14 namespace tab_util { |
12 | 15 |
13 // Helper to find the TabContents that originated the given request. Can be | 16 // Helper to find the TabContents that originated the given request. Can be |
14 // NULL if the tab has been closed or some other error occurs. | 17 // NULL if the tab has been closed or some other error occurs. |
15 // Should only be called from the UI thread, since it accesses TabContent. | 18 // Should only be called from the UI thread, since it accesses TabContent. |
16 TabContents* GetTabContentsByID(int render_process_host_id, int routing_id); | 19 TabContents* GetTabContentsByID(int render_process_host_id, int routing_id); |
17 | 20 |
21 // Returns a new SiteInstance for WebUI and app URLs. Returns the SiteInstance | |
22 // for |source_contents| if it represents the same website as |url|. Returns | |
23 // NULL otherwise. | |
24 SiteInstance* GetSiteInstanceForNewTab( | |
25 TabContents* source_contents, Profile* profile, const GURL& url); | |
Charlie Reis
2011/07/20 20:41:23
I think the arguments are supposed to each be on t
| |
26 | |
18 } // namespace tab_util | 27 } // namespace tab_util |
19 | 28 |
20 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_UTIL_H_ | 29 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_UTIL_H_ |
OLD | NEW |