diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-25 19:52:33 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-25 19:52:33 +0000 |
commit | b658359fcbccccd57bb5448519ab3f9b1ff35531 (patch) | |
tree | c72659685d2bdbe6151a7e2af704772bc0ee2b70 /chrome/browser/tab_contents | |
parent | 5f5b937c2065a1028f5402474199043ce11f8858 (diff) | |
download | chromium_src-b658359fcbccccd57bb5448519ab3f9b1ff35531.zip chromium_src-b658359fcbccccd57bb5448519ab3f9b1ff35531.tar.gz chromium_src-b658359fcbccccd57bb5448519ab3f9b1ff35531.tar.bz2 |
Define the public interface for content browser SiteInstance. This interface is implemented by the SiteInstanceImpl class which lives
in content\browser\site_instance.cc/.h.
Changes as part of creating a content API.
BUG=98716
TEST=No change in functionality. Hopefully it all compiles and works.
Review URL: http://codereview.chromium.org/8515027
Review URL: https://chromiumcodereview.appspot.com/9146028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119102 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/background_contents.cc | 3 | ||||
-rw-r--r-- | chrome/browser/tab_contents/background_contents.h | 5 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_util.cc | 5 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_util.h | 10 |
4 files changed, 15 insertions, 8 deletions
diff --git a/chrome/browser/tab_contents/background_contents.cc b/chrome/browser/tab_contents/background_contents.cc index f799a9c..16d3dfe 100644 --- a/chrome/browser/tab_contents/background_contents.cc +++ b/chrome/browser/tab_contents/background_contents.cc @@ -14,11 +14,12 @@ #include "chrome/common/url_constants.h" #include "chrome/common/chrome_view_type.h" #include "content/browser/renderer_host/render_view_host.h" -#include "content/browser/site_instance.h" #include "content/public/browser/notification_service.h" +#include "content/public/browser/site_instance.h" #include "content/public/browser/web_contents.h" #include "ui/gfx/rect.h" +using content::SiteInstance; using content::WebContents; BackgroundContents::BackgroundContents(SiteInstance* site_instance, diff --git a/chrome/browser/tab_contents/background_contents.h b/chrome/browser/tab_contents/background_contents.h index 675281e..6f3b9cd 100644 --- a/chrome/browser/tab_contents/background_contents.h +++ b/chrome/browser/tab_contents/background_contents.h @@ -16,7 +16,10 @@ #include "webkit/glue/window_open_disposition.h" class Profile; + +namespace content { class SiteInstance; +}; // This class consumes TabContents. It can host a renderer, but does not // have any visible display. @@ -38,7 +41,7 @@ class BackgroundContents : public content::WebContentsDelegate, virtual ~Delegate() {} }; - BackgroundContents(SiteInstance* site_instance, + BackgroundContents(content::SiteInstance* site_instance, int routing_id, Delegate* delegate); virtual ~BackgroundContents(); diff --git a/chrome/browser/tab_contents/tab_util.cc b/chrome/browser/tab_contents/tab_util.cc index 296df65..09461bee 100644 --- a/chrome/browser/tab_contents/tab_util.cc +++ b/chrome/browser/tab_contents/tab_util.cc @@ -9,11 +9,12 @@ #include "chrome/browser/ui/webui/chrome_web_ui_factory.h" #include "chrome/common/chrome_switches.h" #include "content/browser/renderer_host/render_view_host.h" -#include "content/browser/site_instance.h" #include "content/public/browser/render_view_host_delegate.h" +#include "content/public/browser/site_instance.h" #include "content/public/browser/web_contents.h" #include "googleurl/src/gurl.h" +using content::SiteInstance; using content::WebContents; namespace tab_util { @@ -38,7 +39,7 @@ SiteInstance* GetSiteInstanceForNewTab(WebContents* source_contents, if (ChromeWebUIFactory::GetInstance()->UseWebUIForURL(profile, url) || (service && service->extensions()->GetHostedAppByURL(ExtensionURLInfo(url)))) { - return SiteInstance::CreateSiteInstanceForURL(profile, url); + return SiteInstance::CreateForURL(profile, url); } if (!source_contents) diff --git a/chrome/browser/tab_contents/tab_util.h b/chrome/browser/tab_contents/tab_util.h index 0b14f55..5866e02 100644 --- a/chrome/browser/tab_contents/tab_util.h +++ b/chrome/browser/tab_contents/tab_util.h @@ -8,8 +8,9 @@ class GURL; class Profile; -class SiteInstance; + namespace content { +class SiteInstance; class WebContents; } @@ -24,9 +25,10 @@ content::WebContents* GetWebContentsByID(int render_process_id, // Returns a new SiteInstance for WebUI and app URLs. Returns the SiteInstance // for |source_contents| if it represents the same website as |url|. Returns // NULL otherwise. -SiteInstance* GetSiteInstanceForNewTab(content::WebContents* source_contents, - Profile* profile, - const GURL& url); +content::SiteInstance* GetSiteInstanceForNewTab( + content::WebContents* source_contents, + Profile* profile, + const GURL& url); } // namespace tab_util |