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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 // Do nothing if there is already a running enable flow. | 772 // Do nothing if there is already a running enable flow. |
773 if (extension_enable_flow_) | 773 if (extension_enable_flow_) |
774 return; | 774 return; |
775 | 775 |
776 extension_enable_flow_.reset( | 776 extension_enable_flow_.reset( |
777 new ExtensionEnableFlow(profile_, app_id, this)); | 777 new ExtensionEnableFlow(profile_, app_id, this)); |
778 extension_enable_flow_->StartForNativeWindow(NULL); | 778 extension_enable_flow_->StartForNativeWindow(NULL); |
779 return; | 779 return; |
780 } | 780 } |
781 | 781 |
782 #if defined(OS_WIN) | |
783 if (LaunchedInNativeDesktop(app_id)) | |
784 return; | |
785 #endif | |
786 | |
787 // The app will be created for the currently active profile. | 782 // The app will be created for the currently active profile. |
788 AppLaunchParams params( | 783 AppLaunchParams params( |
789 profile_, extension, ui::DispositionFromEventFlags(event_flags), | 784 profile_, extension, ui::DispositionFromEventFlags(event_flags), |
790 chrome::HOST_DESKTOP_TYPE_ASH, extensions::SOURCE_APP_LAUNCHER); | 785 chrome::HOST_DESKTOP_TYPE_ASH, extensions::SOURCE_APP_LAUNCHER); |
791 if (source != ash::LAUNCH_FROM_UNKNOWN && | 786 if (source != ash::LAUNCH_FROM_UNKNOWN && |
792 app_id == extensions::kWebStoreAppId) { | 787 app_id == extensions::kWebStoreAppId) { |
793 // Get the corresponding source string. | 788 // Get the corresponding source string. |
794 std::string source_value = GetSourceFromAppListSource(source); | 789 std::string source_value = GetSourceFromAppListSource(source); |
795 | 790 |
796 // Set an override URL to include the source. | 791 // Set an override URL to include the source. |
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2231 void ChromeLauncherController::ReleaseProfile() { | 2226 void ChromeLauncherController::ReleaseProfile() { |
2232 if (app_sync_ui_state_) | 2227 if (app_sync_ui_state_) |
2233 app_sync_ui_state_->RemoveObserver(this); | 2228 app_sync_ui_state_->RemoveObserver(this); |
2234 | 2229 |
2235 extensions::ExtensionRegistry::Get(profile_)->RemoveObserver(this); | 2230 extensions::ExtensionRegistry::Get(profile_)->RemoveObserver(this); |
2236 | 2231 |
2237 PrefServiceSyncableFromProfile(profile_)->RemoveObserver(this); | 2232 PrefServiceSyncableFromProfile(profile_)->RemoveObserver(this); |
2238 | 2233 |
2239 pref_change_registrar_.RemoveAll(); | 2234 pref_change_registrar_.RemoveAll(); |
2240 } | 2235 } |
OLD | NEW |