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

Side by Side Diff: chrome/browser/tab_contents/tab_util.h

Issue 9146028: Define the public interface for content browser SiteInstance. This interface is implemented by th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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; 9 class GURL;
10 class Profile; 10 class Profile;
11
12 namespace content {
11 class SiteInstance; 13 class SiteInstance;
12 namespace content {
13 class WebContents; 14 class WebContents;
14 } 15 }
15 16
16 namespace tab_util { 17 namespace tab_util {
17 18
18 // Helper to find the WebContents that originated the given request. Can be 19 // 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. 20 // 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. 21 // Should only be called from the UI thread, since it accesses WebContents.
21 content::WebContents* GetWebContentsByID(int render_process_id, 22 content::WebContents* GetWebContentsByID(int render_process_id,
22 int render_view_id); 23 int render_view_id);
23 24
24 // Returns a new SiteInstance for WebUI and app URLs. Returns the SiteInstance 25 // Returns a new SiteInstance for WebUI and app URLs. Returns the SiteInstance
25 // for |source_contents| if it represents the same website as |url|. Returns 26 // for |source_contents| if it represents the same website as |url|. Returns
26 // NULL otherwise. 27 // NULL otherwise.
27 SiteInstance* GetSiteInstanceForNewTab(content::WebContents* source_contents, 28 content::SiteInstance* GetSiteInstanceForNewTab(
28 Profile* profile, 29 content::WebContents* source_contents,
29 const GURL& url); 30 Profile* profile,
31 const GURL& url);
30 32
31 } // namespace tab_util 33 } // namespace tab_util
32 34
33 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_UTIL_H_ 35 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/background_contents.cc ('k') | chrome/browser/tab_contents/tab_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698