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

Unified Diff: chrome/browser/ui/views/apps/native_app_window_views.cc

Issue 157813007: Remove Profile dependency from apps::ShellWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test 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: chrome/browser/ui/views/apps/native_app_window_views.cc
diff --git a/chrome/browser/ui/views/apps/native_app_window_views.cc b/chrome/browser/ui/views/apps/native_app_window_views.cc
index 0d90452c42d4f27e385fa78012153259ff224ea2..6adc3a6e0f6da9aa9ba3e8befae69675d2bf7e86 100644
--- a/chrome/browser/ui/views/apps/native_app_window_views.cc
+++ b/chrome/browser/ui/views/apps/native_app_window_views.cc
@@ -266,12 +266,11 @@ void NativeAppWindowViews::Init(
} else {
InitializeDefaultWindow(create_params);
}
- extension_keybinding_registry_.reset(
- new ExtensionKeybindingRegistryViews(
- profile(),
- window_->GetFocusManager(),
- extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
- shell_window_));
+ extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews(
+ Profile::FromBrowserContext(browser_context()),
+ window_->GetFocusManager(),
+ extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
+ shell_window_));
OnViewWasResized();
window_->AddObserver(this);
@@ -362,11 +361,15 @@ void NativeAppWindowViews::InitializeDefaultWindow(
#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()->GetPath()), hwnd);
+ ui::win::SetAppIdForWindow(
+ ShellIntegration::GetAppModelIdForProfile(
+ app_name_wide,
+ Profile::FromBrowserContext(browser_context())->GetPath()),
+ hwnd);
web_app::UpdateShortcutInfoAndIconForApp(
- *extension(), profile(),
+ *extension(),
+ Profile::FromBrowserContext(browser_context()),
base::Bind(&NativeAppWindowViews::OnShortcutInfoLoaded,
weak_ptr_factory_.GetWeakPtr()));
#endif

Powered by Google App Engine
This is Rietveld 408576698