diff options
author | rockot@chromium.org <rockot@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 23:15:14 +0000 |
---|---|---|
committer | rockot@chromium.org <rockot@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 23:15:14 +0000 |
commit | 4040f291ef5cdf73945cf2dda8d95185718fd25a (patch) | |
tree | 673dcf53c2d1a34ef5c696dd057b1170e0ed1b06 /chrome/browser/extensions/api | |
parent | d809c4e733ed4d8c24096cb9c8a6c82c09237e51 (diff) | |
download | chromium_src-4040f291ef5cdf73945cf2dda8d95185718fd25a.zip chromium_src-4040f291ef5cdf73945cf2dda8d95185718fd25a.tar.gz chromium_src-4040f291ef5cdf73945cf2dda8d95185718fd25a.tar.bz2 |
Remove Profile dependency from apps::ShellWindow
Part of the effort to remove src/chrome dependencies from src/{apps, extensions}
BUG=341690
TBR=tapted@chromium.org,stevenjb@chromium.org
Review URL: https://codereview.chromium.org/157813007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api')
3 files changed, 12 insertions, 8 deletions
diff --git a/chrome/browser/extensions/api/app_window/app_window_api.cc b/chrome/browser/extensions/api/app_window/app_window_api.cc index 1bc4da4..b709e6b 100644 --- a/chrome/browser/extensions/api/app_window/app_window_api.cc +++ b/chrome/browser/extensions/api/app_window/app_window_api.cc @@ -14,6 +14,7 @@ #include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/devtools/devtools_window.h" #include "chrome/browser/extensions/window_controller.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/apps/chrome_shell_window_delegate.h" #include "chrome/common/extensions/api/app_window.h" #include "chrome/common/extensions/features/feature_channel.h" diff --git a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc index 408f29f..b3f2891 100644 --- a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc +++ b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc @@ -15,6 +15,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/session_tab_helper.h" #include "chrome/common/extensions/extension_messages.h" +#include "content/public/browser/browser_context.h" #include "content/public/browser/site_instance.h" #include "content/public/browser/web_contents.h" #include "extensions/common/extension.h" @@ -167,15 +168,16 @@ AshPanelContents::AshPanelContents(ShellWindow* host) AshPanelContents::~AshPanelContents() { } -void AshPanelContents::Initialize(Profile* profile, const GURL& url) { +void AshPanelContents::Initialize(content::BrowserContext* context, + const GURL& url) { url_ = url; extension_function_dispatcher_.reset( - new ExtensionFunctionDispatcher(profile, this)); + new ExtensionFunctionDispatcher(context, this)); - web_contents_.reset(content::WebContents::Create( - content::WebContents::CreateParams( - profile, content::SiteInstance::CreateForURL(profile, url_)))); + web_contents_.reset( + content::WebContents::Create(content::WebContents::CreateParams( + context, content::SiteInstance::CreateForURL(context, url_)))); // Needed to give the web contents a Window ID. Extension APIs expect web // contents to have a Window ID. Also required for FaviconTabHelper to @@ -195,8 +197,8 @@ void AshPanelContents::Initialize(Profile* profile, const GURL& url) { void AshPanelContents::LoadContents(int32 creator_process_id) { // This must be created after the native window has been created. - window_controller_.reset( - new AshPanelWindowController(host_, host_->profile())); + window_controller_.reset(new AshPanelWindowController( + host_, Profile::FromBrowserContext(host_->browser_context()))); web_contents_->GetController().LoadURL( url_, content::Referrer(), content::PAGE_TRANSITION_LINK, diff --git a/chrome/browser/extensions/api/tabs/ash_panel_contents.h b/chrome/browser/extensions/api/tabs/ash_panel_contents.h index 0ccc9c9..021e6a6 100644 --- a/chrome/browser/extensions/api/tabs/ash_panel_contents.h +++ b/chrome/browser/extensions/api/tabs/ash_panel_contents.h @@ -39,7 +39,8 @@ class AshPanelContents : public apps::ShellWindowContents, virtual ~AshPanelContents(); // apps::ShellWindowContents - virtual void Initialize(Profile* profile, const GURL& url) OVERRIDE; + virtual void Initialize(content::BrowserContext* context, + const GURL& url) OVERRIDE; virtual void LoadContents(int32 creator_process_id) OVERRIDE; virtual void NativeWindowChanged(apps::NativeAppWindow* native_app_window) OVERRIDE; |