OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h" | 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h" |
6 | 6 |
7 #include "apps/ui/views/app_window_frame_view.h" | 7 #include "apps/ui/views/app_window_frame_view.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 } | 105 } |
106 | 106 |
107 void ChromeNativeAppWindowViewsWin::InitializeDefaultWindow( | 107 void ChromeNativeAppWindowViewsWin::InitializeDefaultWindow( |
108 const extensions::AppWindow::CreateParams& create_params) { | 108 const extensions::AppWindow::CreateParams& create_params) { |
109 ChromeNativeAppWindowViews::InitializeDefaultWindow(create_params); | 109 ChromeNativeAppWindowViews::InitializeDefaultWindow(create_params); |
110 | 110 |
111 const extensions::Extension* extension = app_window()->GetExtension(); | 111 const extensions::Extension* extension = app_window()->GetExtension(); |
112 if (!extension) | 112 if (!extension) |
113 return; | 113 return; |
114 | 114 |
115 std::string app_name = | 115 if (!IsRunningInAsh()) { |
tapted
2014/09/23 01:24:39
I don't think we want the stuff in UpdateShelfMenu
ananta
2014/09/23 18:18:49
Done.
| |
116 web_app::GenerateApplicationNameFromExtensionId(extension->id()); | 116 std::string app_name = |
117 base::string16 app_name_wide = base::UTF8ToWide(app_name); | 117 web_app::GenerateApplicationNameFromExtensionId(extension->id()); |
118 HWND hwnd = GetNativeAppWindowHWND(); | 118 base::string16 app_name_wide = base::UTF8ToWide(app_name); |
119 Profile* profile = | 119 HWND hwnd = GetNativeAppWindowHWND(); |
120 Profile::FromBrowserContext(app_window()->browser_context()); | 120 Profile* profile = |
121 app_model_id_ = | 121 Profile::FromBrowserContext(app_window()->browser_context()); |
122 ShellIntegration::GetAppModelIdForProfile(app_name_wide, | 122 app_model_id_ = |
123 profile->GetPath()); | 123 ShellIntegration::GetAppModelIdForProfile(app_name_wide, |
124 ui::win::SetAppIdForWindow(app_model_id_, hwnd); | 124 profile->GetPath()); |
125 | 125 ui::win::SetAppIdForWindow(app_model_id_, hwnd); |
126 web_app::UpdateRelaunchDetailsForApp(profile, extension, hwnd); | 126 web_app::UpdateRelaunchDetailsForApp(profile, extension, hwnd); |
127 | 127 } |
128 if (!create_params.alpha_enabled && !IsRunningInAsh()) | 128 if (!create_params.alpha_enabled && !IsRunningInAsh()) |
129 EnsureCaptionStyleSet(); | 129 EnsureCaptionStyleSet(); |
130 UpdateShelfMenu(); | 130 UpdateShelfMenu(); |
131 } | 131 } |
132 | 132 |
133 views::NonClientFrameView* | 133 views::NonClientFrameView* |
134 ChromeNativeAppWindowViewsWin::CreateStandardDesktopAppFrame() { | 134 ChromeNativeAppWindowViewsWin::CreateStandardDesktopAppFrame() { |
135 glass_frame_view_ = NULL; | 135 glass_frame_view_ = NULL; |
136 if (ui::win::IsAeroGlassEnabled()) { | 136 if (ui::win::IsAeroGlassEnabled()) { |
137 glass_frame_view_ = new GlassAppWindowFrameViewWin(this, widget()); | 137 glass_frame_view_ = new GlassAppWindowFrameViewWin(this, widget()); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 extension->id()); | 187 extension->id()); |
188 | 188 |
189 ShellLinkItemList items; | 189 ShellLinkItemList items; |
190 items.push_back(link); | 190 items.push_back(link); |
191 jumplist_updater.AddTasks(items); | 191 jumplist_updater.AddTasks(items); |
192 } | 192 } |
193 | 193 |
194 // Note that an empty jumplist must still be committed to clear all items. | 194 // Note that an empty jumplist must still be committed to clear all items. |
195 jumplist_updater.CommitUpdate(); | 195 jumplist_updater.CommitUpdate(); |
196 } | 196 } |
OLD | NEW |