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

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

Issue 819823002: Fixed create application shortcuts on Windows/Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
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/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 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 384
385 #if defined(OS_WIN) 385 #if defined(OS_WIN)
386 creation_locations.in_quick_launch_bar = quick_launch_check_box_ == NULL ? 386 creation_locations.in_quick_launch_bar = quick_launch_check_box_ == NULL ?
387 NULL : quick_launch_check_box_->checked(); 387 NULL : quick_launch_check_box_->checked();
388 #elif defined(OS_POSIX) 388 #elif defined(OS_POSIX)
389 // Create shortcut in Mac dock or as Linux (gnome/kde) application launcher 389 // Create shortcut in Mac dock or as Linux (gnome/kde) application launcher
390 // are not implemented yet. 390 // are not implemented yet.
391 creation_locations.in_quick_launch_bar = false; 391 creation_locations.in_quick_launch_bar = false;
392 #endif 392 #endif
393 393
394 web_app::CreateShortcutsWithInfo(web_app::SHORTCUT_CREATION_BY_USER, 394 web_app::CreateNonAppShortcut(web_app::SHORTCUT_CREATION_BY_USER,
tapted 2014/12/22 00:05:09 This doesn't look right. The profile and extension
mitchellj 2014/12/22 00:32:23 I think option b) here is probably the easiest for
395 creation_locations, 395 creation_locations, shortcut_info_,
396 shortcut_info_, 396 file_handlers_info_);
397 file_handlers_info_);
398 return true; 397 return true;
399 } 398 }
400 399
401 views::Checkbox* CreateApplicationShortcutView::AddCheckbox( 400 views::Checkbox* CreateApplicationShortcutView::AddCheckbox(
402 const base::string16& text, bool checked) { 401 const base::string16& text, bool checked) {
403 views::Checkbox* checkbox = new views::Checkbox(text); 402 views::Checkbox* checkbox = new views::Checkbox(text);
404 checkbox->SetChecked(checked); 403 checkbox->SetChecked(checked);
405 checkbox->set_listener(this); 404 checkbox->set_listener(this);
406 return checkbox; 405 return checkbox;
407 } 406 }
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 close_callback_.Run(false); 538 close_callback_.Run(false);
540 return CreateApplicationShortcutView::Cancel(); 539 return CreateApplicationShortcutView::Cancel();
541 } 540 }
542 541
543 void CreateChromeApplicationShortcutView::OnAppInfoLoaded( 542 void CreateChromeApplicationShortcutView::OnAppInfoLoaded(
544 const web_app::ShortcutInfo& shortcut_info, 543 const web_app::ShortcutInfo& shortcut_info,
545 const extensions::FileHandlersInfo& file_handlers_info) { 544 const extensions::FileHandlersInfo& file_handlers_info) {
546 shortcut_info_ = shortcut_info; 545 shortcut_info_ = shortcut_info;
547 file_handlers_info_ = file_handlers_info; 546 file_handlers_info_ = file_handlers_info;
548 } 547 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_mac.mm ('k') | chrome/browser/web_applications/web_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698