| 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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 // Do nothing if there is already a running enable flow. | 643 // Do nothing if there is already a running enable flow. |
| 644 if (extension_enable_flow_) | 644 if (extension_enable_flow_) |
| 645 return; | 645 return; |
| 646 | 646 |
| 647 extension_enable_flow_.reset( | 647 extension_enable_flow_.reset( |
| 648 new ExtensionEnableFlow(profile_, app_id, this)); | 648 new ExtensionEnableFlow(profile_, app_id, this)); |
| 649 extension_enable_flow_->StartForNativeWindow(NULL); | 649 extension_enable_flow_->StartForNativeWindow(NULL); |
| 650 return; | 650 return; |
| 651 } | 651 } |
| 652 | 652 |
| 653 #if defined(OS_WIN) | |
| 654 if (LaunchedInNativeDesktop(app_id)) | 653 if (LaunchedInNativeDesktop(app_id)) |
| 655 return; | 654 return; |
| 656 #endif | |
| 657 | 655 |
| 658 // The app will be created for the currently active profile. | 656 // The app will be created for the currently active profile. |
| 659 AppLaunchParams params(profile_, | 657 AppLaunchParams params(profile_, |
| 660 extension, | 658 extension, |
| 661 event_flags, | 659 event_flags, |
| 662 chrome::HOST_DESKTOP_TYPE_ASH); | 660 chrome::HOST_DESKTOP_TYPE_ASH); |
| 663 if (source != ash::LAUNCH_FROM_UNKNOWN && | 661 if (source != ash::LAUNCH_FROM_UNKNOWN && |
| 664 app_id == extension_misc::kWebStoreAppId) { | 662 app_id == extension_misc::kWebStoreAppId) { |
| 665 // Get the corresponding source string. | 663 // Get the corresponding source string. |
| 666 std::string source_value = GetSourceFromAppListSource(source); | 664 std::string source_value = GetSourceFromAppListSource(source); |
| (...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2005 } | 2003 } |
| 2006 | 2004 |
| 2007 void ChromeLauncherController::ReleaseProfile() { | 2005 void ChromeLauncherController::ReleaseProfile() { |
| 2008 if (app_sync_ui_state_) | 2006 if (app_sync_ui_state_) |
| 2009 app_sync_ui_state_->RemoveObserver(this); | 2007 app_sync_ui_state_->RemoveObserver(this); |
| 2010 | 2008 |
| 2011 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); | 2009 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); |
| 2012 | 2010 |
| 2013 pref_change_registrar_.RemoveAll(); | 2011 pref_change_registrar_.RemoveAll(); |
| 2014 } | 2012 } |
| OLD | NEW |