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

Side by Side Diff: chrome/browser/ui/web_applications/web_app_ui.cc

Issue 9428025: Add support for multiple icon sizes for Mac platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 =
313 gfx::Image(tab_contents_wrapper->favicon_tab_helper()->GetFavicon());
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698