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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 // Add item to install ephemeral apps. | 183 // Add item to install ephemeral apps. |
184 if (extensions::util::IsEphemeralApp(extension->id(), | 184 if (extensions::util::IsEphemeralApp(extension->id(), |
185 app_window()->browser_context())) { | 185 app_window()->browser_context())) { |
186 scoped_refptr<ShellLinkItem> link(new ShellLinkItem()); | 186 scoped_refptr<ShellLinkItem> link(new ShellLinkItem()); |
187 link->set_title(l10n_util::GetStringUTF16(IDS_APP_INSTALL_TITLE)); | 187 link->set_title(l10n_util::GetStringUTF16(IDS_APP_INSTALL_TITLE)); |
188 link->set_icon(chrome_path.value(), | 188 link->set_icon(chrome_path.value(), |
189 icon_resources::kInstallPackagedAppIndex); | 189 icon_resources::kInstallPackagedAppIndex); |
190 ShellIntegration::AppendProfileArgs( | 190 ShellIntegration::AppendProfileArgs( |
191 app_window()->browser_context()->GetPath(), link->GetCommandLine()); | 191 app_window()->browser_context()->GetPath(), link->GetCommandLine()); |
192 link->GetCommandLine()->AppendSwitchASCII(switches::kInstallFromWebstore, | 192 link->GetCommandLine()->AppendSwitchASCII( |
193 extension->id()); | 193 switches::kInstallEphemeralAppFromWebstore, extension->id()); |
194 | 194 |
195 ShellLinkItemList items; | 195 ShellLinkItemList items; |
196 items.push_back(link); | 196 items.push_back(link); |
197 jumplist_updater.AddTasks(items); | 197 jumplist_updater.AddTasks(items); |
198 } | 198 } |
199 | 199 |
200 // Note that an empty jumplist must still be committed to clear all items. | 200 // Note that an empty jumplist must still be committed to clear all items. |
201 jumplist_updater.CommitUpdate(); | 201 jumplist_updater.CommitUpdate(); |
202 } | 202 } |
OLD | NEW |