diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-16 21:49:08 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-16 21:49:08 +0000 |
commit | bc09387b3f27ae3d450823c2885f4822e36accce (patch) | |
tree | 56a9304cdcf6659ee235fc1338641ebc3d7ee281 /chrome/browser/background_contents_service.h | |
parent | b7c1fd1fb7ace48afcc09504fd213d6ede0c383c (diff) | |
download | chromium_src-bc09387b3f27ae3d450823c2885f4822e36accce.zip chromium_src-bc09387b3f27ae3d450823c2885f4822e36accce.tar.gz chromium_src-bc09387b3f27ae3d450823c2885f4822e36accce.tar.bz2 |
Create BackgroundContents::Delegate interface to break dependency on browser.h
BUG=50554
Review URL: http://codereview.chromium.org/3106012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56243 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/background_contents_service.h')
-rw-r--r-- | chrome/browser/background_contents_service.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/chrome/browser/background_contents_service.h b/chrome/browser/background_contents_service.h index 6609d62..2512c4d 100644 --- a/chrome/browser/background_contents_service.h +++ b/chrome/browser/background_contents_service.h @@ -9,14 +9,23 @@ #include <map> #include "base/gtest_prod_util.h" +#include "chrome/browser/tab_contents/background_contents.h" #include "chrome/common/notification_observer.h" #include "chrome/common/notification_registrar.h" +#include "chrome/common/window_container_type.h" #include "googleurl/src/gurl.h" +#include "webkit/glue/window_open_disposition.h" class BackgroundContents; class CommandLine; class PrefService; class Profile; +class TabContents; + +namespace gfx { +class Rect; +} + struct BackgroundContentsOpenedDetails; // BackgroundContentsService is owned by the profile, and is responsible for @@ -27,7 +36,8 @@ struct BackgroundContentsOpenedDetails; // It is also responsible for tracking the association between // BackgroundContents and their parent app, and shutting them down when the // parent app is unloaded. -class BackgroundContentsService : private NotificationObserver { +class BackgroundContentsService : private NotificationObserver, + public BackgroundContents::Delegate { public: BackgroundContentsService(Profile* profile, const CommandLine* command_line); virtual ~BackgroundContentsService(); @@ -38,6 +48,12 @@ class BackgroundContentsService : private NotificationObserver { static void RegisterUserPrefs(PrefService* prefs); + // BackgroundContents::Delegate implementation. + virtual void AddTabContents(TabContents* new_contents, + WindowOpenDisposition disposition, + const gfx::Rect& initial_pos, + bool user_gesture); + private: friend class BackgroundContentsServiceTest; FRIEND_TEST_ALL_PREFIXES(BackgroundContentsServiceTest, |