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

Side by Side Diff: chrome/browser/ui/views/create_application_shortcut_view.cc

Issue 8885007: Remove custom Task implementations from VisitedLinkMaster and web_app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years 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/views/create_application_shortcut_view.h" 5 #include "chrome/browser/ui/views/create_application_shortcut_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 #if defined(OS_WIN) 370 #if defined(OS_WIN)
371 shortcut_info_.create_in_quick_launch_bar = quick_launch_check_box_ == NULL ? 371 shortcut_info_.create_in_quick_launch_bar = quick_launch_check_box_ == NULL ?
372 NULL : quick_launch_check_box_->checked(); 372 NULL : quick_launch_check_box_->checked();
373 #elif defined(OS_POSIX) 373 #elif defined(OS_POSIX)
374 // Create shortcut in Mac dock or as Linux (gnome/kde) application launcher 374 // Create shortcut in Mac dock or as Linux (gnome/kde) application launcher
375 // are not implemented yet. 375 // are not implemented yet.
376 shortcut_info_.create_in_quick_launch_bar = false; 376 shortcut_info_.create_in_quick_launch_bar = false;
377 #endif 377 #endif
378 378
379 web_app::CreateShortcut(profile_->GetPath(), 379 web_app::CreateShortcut(profile_->GetPath(),
380 shortcut_info_, 380 shortcut_info_);
James Hawkins 2011/12/08 18:43:56 Put this on the previous line.
dcheng 2011/12/08 18:51:28 Done.
381 NULL);
382 return true; 381 return true;
383 } 382 }
384 383
385 384
386 views::View* CreateApplicationShortcutView::GetContentsView() { 385 views::View* CreateApplicationShortcutView::GetContentsView() {
387 return this; 386 return this;
388 } 387 }
389 388
390 views::Checkbox* CreateApplicationShortcutView::AddCheckbox( 389 views::Checkbox* CreateApplicationShortcutView::AddCheckbox(
391 const string16& text, bool checked) { 390 const string16& text, bool checked) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 // Called by tracker_ when the app's icon is loaded. 524 // Called by tracker_ when the app's icon is loaded.
526 void CreateChromeApplicationShortcutView::OnImageLoaded( 525 void CreateChromeApplicationShortcutView::OnImageLoaded(
527 SkBitmap* image, const ExtensionResource& resource, int index) { 526 SkBitmap* image, const ExtensionResource& resource, int index) {
528 if (!image || image->isNull()) 527 if (!image || image->isNull())
529 image = ExtensionIconSource::LoadImageByResourceId(IDR_APP_DEFAULT_ICON); 528 image = ExtensionIconSource::LoadImageByResourceId(IDR_APP_DEFAULT_ICON);
530 529
531 shortcut_info_.favicon = *image; 530 shortcut_info_.favicon = *image;
532 CHECK(app_info_); 531 CHECK(app_info_);
533 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); 532 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon);
534 } 533 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/visitedlink/visitedlink_master.cc » ('j') | chrome/browser/visitedlink/visitedlink_master.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698