OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
302 const WebApplicationInfo& app_info = | 302 const WebApplicationInfo& app_info = |
303 tab_contents_wrapper->extension_tab_helper()->web_app_info(); | 303 tab_contents_wrapper->extension_tab_helper()->web_app_info(); |
304 | 304 |
305 info->url = app_info.app_url.is_empty() ? web_contents->GetURL() : | 305 info->url = app_info.app_url.is_empty() ? web_contents->GetURL() : |
306 app_info.app_url; | 306 app_info.app_url; |
307 info->title = app_info.title.empty() ? | 307 info->title = app_info.title.empty() ? |
308 (web_contents->GetTitle().empty() ? UTF8ToUTF16(info->url.spec()) : | 308 (web_contents->GetTitle().empty() ? UTF8ToUTF16(info->url.spec()) : |
309 web_contents->GetTitle()) : | 309 web_contents->GetTitle()) : |
310 app_info.title; | 310 app_info.title; |
311 info->description = app_info.description; | 311 info->description = app_info.description; |
312 info->favicon = tab_contents_wrapper->favicon_tab_helper()->GetFavicon(); | 312 info->favicon = gfx::Image( |
313 new SkBitmap(tab_contents_wrapper->favicon_tab_helper()->GetFavicon())); | |
Robert Sesek
2012/02/29 15:13:37
The |new SkBitmap| is no longer needed.
sail
2012/02/29 19:45:16
Done.
| |
313 } | 314 } |
314 | 315 |
315 void UpdateShortcutForTabContents(TabContentsWrapper* tab_contents) { | 316 void UpdateShortcutForTabContents(TabContentsWrapper* tab_contents) { |
316 #if defined(OS_WIN) | 317 #if defined(OS_WIN) |
317 // UpdateShortcutWorker will delete itself when it's done. | 318 // UpdateShortcutWorker will delete itself when it's done. |
318 UpdateShortcutWorker* worker = new UpdateShortcutWorker(tab_contents); | 319 UpdateShortcutWorker* worker = new UpdateShortcutWorker(tab_contents); |
319 worker->Run(); | 320 worker->Run(); |
320 #endif // defined(OS_WIN) | 321 #endif // defined(OS_WIN) |
321 } | 322 } |
322 | 323 |
323 } // namespace web_app | 324 } // namespace web_app |
OLD | NEW |