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

Unified Diff: trunk/src/apps/app_shim/extension_app_shim_handler_mac.cc

Issue 163913004: Revert 250826 "Remove Profile dependency from apps::ShellWindow" (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/app_shim/app_shim_handler_mac.h ('k') | trunk/src/apps/app_window_contents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/apps/app_shim/extension_app_shim_handler_mac.cc
===================================================================
--- trunk/src/apps/app_shim/extension_app_shim_handler_mac.cc (revision 251093)
+++ trunk/src/apps/app_shim/extension_app_shim_handler_mac.cc (working copy)
@@ -230,16 +230,14 @@
ExtensionAppShimHandler* handler =
g_browser_process->platform_part()->app_shim_host_manager()->
extension_app_shim_handler();
- Host* host = handler->FindHost(
- Profile::FromBrowserContext(shell_window->browser_context()),
- shell_window->extension_id());
+ Host* host = handler->FindHost(shell_window->profile(),
+ shell_window->extension_id());
if (host) {
handler->OnShimQuit(host);
} else {
// App shims might be disabled or the shim is still starting up.
- ShellWindowRegistry::Get(
- Profile::FromBrowserContext(shell_window->browser_context()))
- ->CloseAllShellWindowsForApp(shell_window->extension_id());
+ ShellWindowRegistry::Get(shell_window->profile())->
+ CloseAllShellWindowsForApp(shell_window->extension_id());
}
}
@@ -247,8 +245,7 @@
ExtensionAppShimHandler* handler =
g_browser_process->platform_part()->app_shim_host_manager()->
extension_app_shim_handler();
- Profile* profile =
- Profile::FromBrowserContext(shell_window->browser_context());
+ Profile* profile = shell_window->profile();
Host* host = handler->FindHost(profile, shell_window->extension_id());
if (host)
host->OnAppHide();
@@ -261,8 +258,7 @@
ExtensionAppShimHandler* handler =
g_browser_process->platform_part()->app_shim_host_manager()->
extension_app_shim_handler();
- Profile* profile =
- Profile::FromBrowserContext(shell_window->browser_context());
+ Profile* profile = shell_window->profile();
const std::string& app_id = shell_window->extension_id();
Host* host = handler->FindHost(profile, app_id);
if (host) {
@@ -281,8 +277,7 @@
ExtensionAppShimHandler* handler =
g_browser_process->platform_part()->app_shim_host_manager()->
extension_app_shim_handler();
- Profile* profile =
- Profile::FromBrowserContext(shell_window->browser_context());
+ Profile* profile = shell_window->profile();
Host* host = handler->FindHost(profile, shell_window->extension_id());
if (host) {
// Bring the window to the front without showing it.
« no previous file with comments | « trunk/src/apps/app_shim/app_shim_handler_mac.h ('k') | trunk/src/apps/app_window_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698