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/web_applications/web_app_win.h" | 5 #include "chrome/browser/web_applications/web_app_win.h" |
6 | 6 |
7 #include <shlobj.h> | 7 #include <shlobj.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 std::vector<base::FilePath> shortcut_paths; | 567 std::vector<base::FilePath> shortcut_paths; |
568 // Locations to add to shortcut_paths. | 568 // Locations to add to shortcut_paths. |
569 struct { | 569 struct { |
570 bool use_this_location; | 570 bool use_this_location; |
571 ShellUtil::ShortcutLocation location_id; | 571 ShellUtil::ShortcutLocation location_id; |
572 } locations[] = { | 572 } locations[] = { |
573 { | 573 { |
574 creation_locations.on_desktop, | 574 creation_locations.on_desktop, |
575 ShellUtil::SHORTCUT_LOCATION_DESKTOP | 575 ShellUtil::SHORTCUT_LOCATION_DESKTOP |
576 }, { | 576 }, { |
577 creation_locations.applications_menu_location == APP_MENU_LOCATION_ROOT, | |
578 ShellUtil::SHORTCUT_LOCATION_START_MENU_ROOT | |
579 }, { | |
580 creation_locations.applications_menu_location == | |
581 APP_MENU_LOCATION_SUBDIR_CHROME_DEPRECATED, | |
582 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR_DEPRECATED | |
583 }, { | |
584 creation_locations.applications_menu_location == | 577 creation_locations.applications_menu_location == |
585 APP_MENU_LOCATION_SUBDIR_CHROMEAPPS, | 578 APP_MENU_LOCATION_SUBDIR_CHROMEAPPS, |
586 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_APPS_DIR | 579 ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_APPS_DIR |
587 }, { | 580 }, { |
588 // For Win7+, |in_quick_launch_bar| indicates that we are pinning to | 581 // For Win7+, |in_quick_launch_bar| indicates that we are pinning to |
589 // taskbar. This needs to be handled by callers. | 582 // taskbar. This needs to be handled by callers. |
590 creation_locations.in_quick_launch_bar && | 583 creation_locations.in_quick_launch_bar && |
591 base::win::CanPinShortcutToTaskbar(), | 584 base::win::CanPinShortcutToTaskbar(), |
592 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH | 585 ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH |
593 } | 586 } |
(...skipping 25 matching lines...) Expand all Loading... |
619 | 612 |
620 } // namespace internals | 613 } // namespace internals |
621 | 614 |
622 void UpdateShortcutForTabContents(content::WebContents* web_contents) { | 615 void UpdateShortcutForTabContents(content::WebContents* web_contents) { |
623 // UpdateShortcutWorker will delete itself when it's done. | 616 // UpdateShortcutWorker will delete itself when it's done. |
624 UpdateShortcutWorker* worker = new UpdateShortcutWorker(web_contents); | 617 UpdateShortcutWorker* worker = new UpdateShortcutWorker(web_contents); |
625 worker->Run(); | 618 worker->Run(); |
626 } | 619 } |
627 | 620 |
628 } // namespace web_app | 621 } // namespace web_app |
OLD | NEW |