Index: apps/app_shim/extension_app_shim_handler_mac.cc |
diff --git a/apps/app_shim/extension_app_shim_handler_mac.cc b/apps/app_shim/extension_app_shim_handler_mac.cc |
index 4a580a5e3ae9507177a819d42ff6de95a969be84..d9917bc028cc41a5345bc9e017e2d3dbb93ac989 100644 |
--- a/apps/app_shim/extension_app_shim_handler_mac.cc |
+++ b/apps/app_shim/extension_app_shim_handler_mac.cc |
@@ -230,14 +230,16 @@ void ExtensionAppShimHandler::QuitAppForWindow(ShellWindow* shell_window) { |
ExtensionAppShimHandler* handler = |
g_browser_process->platform_part()->app_shim_host_manager()-> |
extension_app_shim_handler(); |
- Host* host = handler->FindHost(shell_window->profile(), |
- shell_window->extension_id()); |
+ Host* host = handler->FindHost( |
+ Profile::FromBrowserContext(shell_window->browser_context()), |
+ shell_window->extension_id()); |
if (host) { |
handler->OnShimQuit(host); |
} else { |
// App shims might be disabled or the shim is still starting up. |
- ShellWindowRegistry::Get(shell_window->profile())-> |
- CloseAllShellWindowsForApp(shell_window->extension_id()); |
+ ShellWindowRegistry::Get( |
+ Profile::FromBrowserContext(shell_window->browser_context())) |
tapted
2014/02/17 05:25:59
nit: The `FromBrowserContext` cast probably not ne
|
+ ->CloseAllShellWindowsForApp(shell_window->extension_id()); |
} |
} |
@@ -245,7 +247,8 @@ void ExtensionAppShimHandler::HideAppForWindow(ShellWindow* shell_window) { |
ExtensionAppShimHandler* handler = |
g_browser_process->platform_part()->app_shim_host_manager()-> |
extension_app_shim_handler(); |
- Profile* profile = shell_window->profile(); |
+ Profile* profile = |
+ Profile::FromBrowserContext(shell_window->browser_context()); |
Host* host = handler->FindHost(profile, shell_window->extension_id()); |
if (host) |
host->OnAppHide(); |
@@ -258,7 +261,8 @@ void ExtensionAppShimHandler::FocusAppForWindow(ShellWindow* shell_window) { |
ExtensionAppShimHandler* handler = |
g_browser_process->platform_part()->app_shim_host_manager()-> |
extension_app_shim_handler(); |
- Profile* profile = shell_window->profile(); |
+ Profile* profile = |
+ Profile::FromBrowserContext(shell_window->browser_context()); |
const std::string& app_id = shell_window->extension_id(); |
Host* host = handler->FindHost(profile, app_id); |
if (host) { |
@@ -277,7 +281,8 @@ bool ExtensionAppShimHandler::RequestUserAttentionForWindow( |
ExtensionAppShimHandler* handler = |
g_browser_process->platform_part()->app_shim_host_manager()-> |
extension_app_shim_handler(); |
- Profile* profile = shell_window->profile(); |
+ Profile* profile = |
+ Profile::FromBrowserContext(shell_window->browser_context()); |
Host* host = handler->FindHost(profile, shell_window->extension_id()); |
if (host) { |
// Bring the window to the front without showing it. |