diff options
author | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-10 19:31:12 +0000 |
---|---|---|
committer | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-10 19:31:12 +0000 |
commit | da58f5b14586b6db155a22b8b1c8d4de8cf6d8f5 (patch) | |
tree | bbdc8f01e3a24d791abc41ce5404e3202e803def /chrome/browser/tab_contents/background_contents.h | |
parent | 4f35e4b08dbd1ed5221402a5aba29a69ef27fa58 (diff) | |
download | chromium_src-da58f5b14586b6db155a22b8b1c8d4de8cf6d8f5.zip chromium_src-da58f5b14586b6db155a22b8b1c8d4de8cf6d8f5.tar.gz chromium_src-da58f5b14586b6db155a22b8b1c8d4de8cf6d8f5.tar.bz2 |
Added support for displaying BackgroundContents in the task manager.
Previously BackgroundContents would get created, but since they were
not TabContents, they would not show up.
BUG=62105
TEST=TaskManagerBrowserTest.NoticeBGContentsChanges
Review URL: http://codereview.chromium.org/4760001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65690 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/background_contents.h')
-rw-r--r-- | chrome/browser/tab_contents/background_contents.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/background_contents.h b/chrome/browser/tab_contents/background_contents.h index 63a30d9..81ae92d 100644 --- a/chrome/browser/tab_contents/background_contents.h +++ b/chrome/browser/tab_contents/background_contents.h @@ -58,6 +58,7 @@ class BackgroundContents : public RenderViewHostDelegate, RenderViewHost* render_view_host() { return render_view_host_; } // RenderViewHostDelegate implementation. + virtual BackgroundContents* GetAsBackgroundContents() { return this; } virtual RenderViewHostDelegate::View* GetViewDelegate() { return this; } virtual const GURL& GetURL() const { return url_; } virtual ViewType::Type GetRenderViewType() const; @@ -135,6 +136,13 @@ class BackgroundContents : public RenderViewHostDelegate, const std::string& value); virtual void ClearInspectorSettings(); + // Helper to find the BackgroundContents that originated the given request. + // Can be NULL if the page has been closed or some other error occurs. + // Should only be called from the UI thread, since it accesses + // BackgroundContents. + static BackgroundContents* GetBackgroundContentsByID(int render_process_id, + int render_view_id); + protected: // Exposed for testing. BackgroundContents(); |