OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_applications/web_app_ui.h" | 5 #include "chrome/browser/ui/web_applications/web_app_ui.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 | 308 |
309 info->url = app_info.app_url.is_empty() ? web_contents->GetURL() : | 309 info->url = app_info.app_url.is_empty() ? web_contents->GetURL() : |
310 app_info.app_url; | 310 app_info.app_url; |
311 info->title = app_info.title.empty() ? | 311 info->title = app_info.title.empty() ? |
312 (web_contents->GetTitle().empty() ? UTF8ToUTF16(info->url.spec()) : | 312 (web_contents->GetTitle().empty() ? UTF8ToUTF16(info->url.spec()) : |
313 web_contents->GetTitle()) : | 313 web_contents->GetTitle()) : |
314 app_info.title; | 314 app_info.title; |
315 info->description = app_info.description; | 315 info->description = app_info.description; |
316 info->favicon = | 316 info->favicon = |
317 gfx::Image(tab_contents->favicon_tab_helper()->GetFavicon()); | 317 gfx::Image(tab_contents->favicon_tab_helper()->GetFavicon()); |
| 318 |
| 319 info->profile_path = tab_contents->profile()->GetPath(); |
318 } | 320 } |
319 | 321 |
320 void UpdateShortcutForTabContents(TabContents* tab_contents) { | 322 void UpdateShortcutForTabContents(TabContents* tab_contents) { |
321 #if defined(OS_WIN) | 323 #if defined(OS_WIN) |
322 // UpdateShortcutWorker will delete itself when it's done. | 324 // UpdateShortcutWorker will delete itself when it's done. |
323 UpdateShortcutWorker* worker = new UpdateShortcutWorker(tab_contents); | 325 UpdateShortcutWorker* worker = new UpdateShortcutWorker(tab_contents); |
324 worker->Run(); | 326 worker->Run(); |
325 #endif // defined(OS_WIN) | 327 #endif // defined(OS_WIN) |
326 } | 328 } |
327 | 329 |
328 } // namespace web_app | 330 } // namespace web_app |
OLD | NEW |