OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ash/launcher/chrome_launcher_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 // Do nothing if there is already a running enable flow. | 642 // Do nothing if there is already a running enable flow. |
643 if (extension_enable_flow_) | 643 if (extension_enable_flow_) |
644 return; | 644 return; |
645 | 645 |
646 extension_enable_flow_.reset( | 646 extension_enable_flow_.reset( |
647 new ExtensionEnableFlow(profile_, app_id, this)); | 647 new ExtensionEnableFlow(profile_, app_id, this)); |
648 extension_enable_flow_->StartForNativeWindow(NULL); | 648 extension_enable_flow_->StartForNativeWindow(NULL); |
649 return; | 649 return; |
650 } | 650 } |
651 | 651 |
| 652 #if defined(OS_WIN) |
652 if (LaunchedInNativeDesktop(app_id)) | 653 if (LaunchedInNativeDesktop(app_id)) |
653 return; | 654 return; |
| 655 #endif |
654 | 656 |
655 // The app will be created for the currently active profile. | 657 // The app will be created for the currently active profile. |
656 AppLaunchParams params(profile_, | 658 AppLaunchParams params(profile_, |
657 extension, | 659 extension, |
658 event_flags, | 660 event_flags, |
659 chrome::HOST_DESKTOP_TYPE_ASH); | 661 chrome::HOST_DESKTOP_TYPE_ASH); |
660 if (source != ash::LAUNCH_FROM_UNKNOWN && | 662 if (source != ash::LAUNCH_FROM_UNKNOWN && |
661 app_id == extension_misc::kWebStoreAppId) { | 663 app_id == extension_misc::kWebStoreAppId) { |
662 // Get the corresponding source string. | 664 // Get the corresponding source string. |
663 std::string source_value = GetSourceFromAppListSource(source); | 665 std::string source_value = GetSourceFromAppListSource(source); |
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1999 } | 2001 } |
2000 | 2002 |
2001 void ChromeLauncherController::ReleaseProfile() { | 2003 void ChromeLauncherController::ReleaseProfile() { |
2002 if (app_sync_ui_state_) | 2004 if (app_sync_ui_state_) |
2003 app_sync_ui_state_->RemoveObserver(this); | 2005 app_sync_ui_state_->RemoveObserver(this); |
2004 | 2006 |
2005 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); | 2007 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); |
2006 | 2008 |
2007 pref_change_registrar_.RemoveAll(); | 2009 pref_change_registrar_.RemoveAll(); |
2008 } | 2010 } |
OLD | NEW |