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

Unified Diff: apps/app_window_contents.cc

Issue 157813007: Remove Profile dependency from apps::ShellWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: apps/app_window_contents.cc
diff --git a/apps/app_window_contents.cc b/apps/app_window_contents.cc
index e3ddf7ced433c61f02153e5d0cf13caa050e1bbe..fbe70cc80e347aaee5ee30c672b1e75128401974 100644
--- a/apps/app_window_contents.cc
+++ b/apps/app_window_contents.cc
@@ -6,9 +6,9 @@
#include "apps/ui/native_app_window.h"
#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/app_window.h"
#include "chrome/common/extensions/extension_messages.h"
+#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
@@ -28,15 +28,16 @@ AppWindowContents::AppWindowContents(ShellWindow* host)
AppWindowContents::~AppWindowContents() {
}
-void AppWindowContents::Initialize(Profile* profile, const GURL& url) {
+void AppWindowContents::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_))));
content::WebContentsObserver::Observe(web_contents_.get());
web_contents_->GetMutableRendererPrefs()->

Powered by Google App Engine
This is Rietveld 408576698