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

Unified Diff: trunk/src/apps/shell_window.h

Issue 164613002: Revert 251094 "Revert 250826 "Remove Profile dependency from app..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
« no previous file with comments | « trunk/src/apps/shell/browser/shell_extensions_browser_client.cc ('k') | trunk/src/apps/shell_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/apps/shell_window.h
===================================================================
--- trunk/src/apps/shell_window.h (revision 251111)
+++ trunk/src/apps/shell_window.h (working copy)
@@ -21,7 +21,6 @@
#include "ui/gfx/rect.h"
class GURL;
-class Profile;
class SkRegion;
namespace base {
@@ -29,6 +28,7 @@
}
namespace content {
+class BrowserContext;
class WebContents;
}
@@ -58,7 +58,8 @@
virtual ~ShellWindowContents() {}
// Called to initialize the WebContents, before the app window is created.
- virtual void Initialize(Profile* profile, const GURL& url) = 0;
+ virtual void Initialize(content::BrowserContext* context,
+ const GURL& url) = 0;
// Called to load the contents, after the app window is created.
virtual void LoadContents(int32 creator_process_id) = 0;
@@ -201,10 +202,10 @@
// Link handling.
virtual content::WebContents* OpenURLFromTab(
- Profile* profile,
+ content::BrowserContext* context,
content::WebContents* source,
const content::OpenURLParams& params) = 0;
- virtual void AddNewContents(Profile* profile,
+ virtual void AddNewContents(content::BrowserContext* context,
content::WebContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
@@ -239,7 +240,7 @@
// with a non-standard render interface (e.g. v1 apps using Ash Panels).
// Normally ShellWindow::Create should be used.
// The constructed shell window takes ownership of |delegate|.
- ShellWindow(Profile* profile,
+ ShellWindow(content::BrowserContext* context,
Delegate* delegate,
const extensions::Extension* extension);
@@ -260,7 +261,7 @@
return (window_type_ == WINDOW_TYPE_PANEL ||
window_type_ == WINDOW_TYPE_V1_PANEL);
}
- Profile* profile() const { return profile_; }
+ content::BrowserContext* browser_context() const { return browser_context_; }
const gfx::Image& app_icon() const { return app_icon_; }
const GURL& app_icon_url() const { return app_icon_url_; }
const gfx::Image& badge_icon() const { return badge_icon_; }
@@ -488,7 +489,10 @@
virtual void OnExtensionIconImageChanged(
extensions::IconImage* image) OVERRIDE;
- Profile* profile_; // weak pointer - owned by ProfileManager.
+ // The browser context with which this window is associated. ShellWindow does
+ // not own this object.
+ content::BrowserContext* browser_context_;
+
// weak pointer - owned by ExtensionService.
const extensions::Extension* extension_;
const std::string extension_id_;
« no previous file with comments | « trunk/src/apps/shell/browser/shell_extensions_browser_client.cc ('k') | trunk/src/apps/shell_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698