Chromium Code Reviews| Index: apps/shell_window.h |
| diff --git a/apps/shell_window.h b/apps/shell_window.h |
| index 8be7a59581f692b8f4c94f3731f0a0877c525319..b65de545ced5dbdaaf7ab8b88a24ae788729428b 100644 |
| --- a/apps/shell_window.h |
| +++ b/apps/shell_window.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
|
James Cook
2014/02/12 00:46:41
nit: You don't need to update these when you edit
Ken Rockot(use gerrit already)
2014/02/12 01:05:46
Yeah actually I just had this conversation with so
|
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -11,6 +11,7 @@ |
| #include "chrome/browser/extensions/extension_keybinding_registry.h" |
| #include "chrome/browser/sessions/session_id.h" |
| #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" |
| +#include "content/public/browser/browser_context.h" |
|
James Cook
2014/02/12 00:46:41
Isn't forward declaring it enough?
Ken Rockot(use gerrit already)
2014/02/12 01:05:46
Yes, oops.
|
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
| #include "content/public/browser/web_contents_delegate.h" |
| @@ -21,7 +22,6 @@ |
| #include "ui/gfx/rect.h" |
| class GURL; |
| -class Profile; |
| class SkRegion; |
| namespace base { |
| @@ -29,6 +29,7 @@ class DictionaryValue; |
| } |
| namespace content { |
| +class BrowserContext; |
| class WebContents; |
| } |
| @@ -58,7 +59,8 @@ class ShellWindowContents { |
| 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 +203,10 @@ class ShellWindow : public content::NotificationObserver, |
| // 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 +241,7 @@ class ShellWindow : public content::NotificationObserver, |
| // 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 +262,7 @@ class ShellWindow : public content::NotificationObserver, |
| 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 +490,10 @@ class ShellWindow : public content::NotificationObserver, |
| 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_; |