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

Unified Diff: trunk/src/chrome/browser/ui/views/apps/native_app_window_views.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
Index: trunk/src/chrome/browser/ui/views/apps/native_app_window_views.cc
===================================================================
--- trunk/src/chrome/browser/ui/views/apps/native_app_window_views.cc (revision 251093)
+++ trunk/src/chrome/browser/ui/views/apps/native_app_window_views.cc (working copy)
@@ -266,11 +266,12 @@
} else {
InitializeDefaultWindow(create_params);
}
- extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews(
- Profile::FromBrowserContext(browser_context()),
- window_->GetFocusManager(),
- extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
- shell_window_));
+ extension_keybinding_registry_.reset(
+ new ExtensionKeybindingRegistryViews(
+ profile(),
+ window_->GetFocusManager(),
+ extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
+ shell_window_));
OnViewWasResized();
window_->AddObserver(this);
@@ -361,15 +362,11 @@
#if defined(OS_WIN)
base::string16 app_name_wide = base::UTF8ToWide(app_name);
HWND hwnd = GetNativeAppWindowHWND();
- ui::win::SetAppIdForWindow(
- ShellIntegration::GetAppModelIdForProfile(
- app_name_wide,
- Profile::FromBrowserContext(browser_context())->GetPath()),
- hwnd);
+ ui::win::SetAppIdForWindow(ShellIntegration::GetAppModelIdForProfile(
+ app_name_wide, profile()->GetPath()), hwnd);
web_app::UpdateShortcutInfoAndIconForApp(
- *extension(),
- Profile::FromBrowserContext(browser_context()),
+ *extension(), profile(),
base::Bind(&NativeAppWindowViews::OnShortcutInfoLoaded,
weak_ptr_factory_.GetWeakPtr()));
#endif

Powered by Google App Engine
This is Rietveld 408576698