Index: trunk/src/chrome/browser/ui/apps/chrome_shell_window_delegate.cc |
=================================================================== |
--- trunk/src/chrome/browser/ui/apps/chrome_shell_window_delegate.cc (revision 251111) |
+++ trunk/src/chrome/browser/ui/apps/chrome_shell_window_delegate.cc (working copy) |
@@ -9,6 +9,7 @@ |
#include "chrome/browser/file_select_helper.h" |
#include "chrome/browser/media/media_capture_devices_dispatcher.h" |
#include "chrome/browser/platform_util.h" |
+#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/shell_integration.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_dialogs.h" |
@@ -16,6 +17,7 @@ |
#include "chrome/browser/ui/browser_window.h" |
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
#include "chrome/common/render_messages.h" |
+#include "content/public/browser/browser_context.h" |
#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/browser/web_contents_view.h" |
@@ -39,7 +41,7 @@ |
// Opens a URL with Chromium (not external browser) with the right profile. |
content::WebContents* OpenURLFromTabInternal( |
- Profile* profile, |
+ content::BrowserContext* context, |
content::WebContents* source, |
const content::OpenURLParams& params) { |
// Force all links to open in a new tab, even if they were trying to open a |
@@ -49,7 +51,7 @@ |
new_tab_params.disposition = params.disposition == NEW_BACKGROUND_TAB |
? params.disposition |
: NEW_FOREGROUND_TAB; |
- new_tab_params.initiating_profile = profile; |
+ new_tab_params.initiating_profile = Profile::FromBrowserContext(context); |
chrome::Navigate(&new_tab_params); |
return new_tab_params.target_contents; |
@@ -148,14 +150,14 @@ |
} |
content::WebContents* ChromeShellWindowDelegate::OpenURLFromTab( |
- Profile* profile, |
+ content::BrowserContext* context, |
content::WebContents* source, |
const content::OpenURLParams& params) { |
- return OpenURLFromTabInternal(profile, source, params); |
+ return OpenURLFromTabInternal(context, source, params); |
} |
void ChromeShellWindowDelegate::AddNewContents( |
- Profile* profile, |
+ content::BrowserContext* context, |
content::WebContents* new_contents, |
WindowOpenDisposition disposition, |
const gfx::Rect& initial_pos, |
@@ -168,7 +170,7 @@ |
return; |
} |
chrome::ScopedTabbedBrowserDisplayer displayer( |
- profile, chrome::GetActiveDesktop()); |
+ Profile::FromBrowserContext(context), chrome::GetActiveDesktop()); |
// Force all links to open in a new tab, even if they were trying to open a |
// new window. |
disposition = |