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 if (extension_enable_flow_) | 772 if (extension_enable_flow_) |
773 return; | 773 return; |
774 | 774 |
775 extension_enable_flow_.reset( | 775 extension_enable_flow_.reset( |
776 new ExtensionEnableFlow(profile_, app_id, this)); | 776 new ExtensionEnableFlow(profile_, app_id, this)); |
777 extension_enable_flow_->StartForNativeWindow(NULL); | 777 extension_enable_flow_->StartForNativeWindow(NULL); |
778 return; | 778 return; |
779 } | 779 } |
780 | 780 |
781 // The app will be created for the currently active profile. | 781 // The app will be created for the currently active profile. |
782 AppLaunchParams params( | 782 AppLaunchParams params = CreateAppLaunchParamsWithEventFlags( |
783 profile_, extension, ui::DispositionFromEventFlags(event_flags), | 783 profile_, extension, event_flags, extensions::SOURCE_APP_LAUNCHER); |
784 chrome::HOST_DESKTOP_TYPE_ASH, extensions::SOURCE_APP_LAUNCHER); | |
785 if (source != ash::LAUNCH_FROM_UNKNOWN && | 784 if (source != ash::LAUNCH_FROM_UNKNOWN && |
786 app_id == extensions::kWebStoreAppId) { | 785 app_id == extensions::kWebStoreAppId) { |
787 // Get the corresponding source string. | 786 // Get the corresponding source string. |
788 std::string source_value = GetSourceFromAppListSource(source); | 787 std::string source_value = GetSourceFromAppListSource(source); |
789 | 788 |
790 // Set an override URL to include the source. | 789 // Set an override URL to include the source. |
791 GURL extension_url = extensions::AppLaunchInfo::GetFullLaunchURL(extension); | 790 GURL extension_url = extensions::AppLaunchInfo::GetFullLaunchURL(extension); |
792 params.override_url = net::AppendQueryParameter( | 791 params.override_url = net::AppendQueryParameter( |
793 extension_url, extension_urls::kWebstoreSourceField, source_value); | 792 extension_url, extension_urls::kWebstoreSourceField, source_value); |
794 } | 793 } |
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2249 | 2248 |
2250 AppIconLoader* ChromeLauncherController::GetAppIconLoaderForApp( | 2249 AppIconLoader* ChromeLauncherController::GetAppIconLoaderForApp( |
2251 const std::string& app_id) { | 2250 const std::string& app_id) { |
2252 for (const auto& app_icon_loader : app_icon_loaders_) { | 2251 for (const auto& app_icon_loader : app_icon_loaders_) { |
2253 if (app_icon_loader->CanLoadImageForApp(app_id)) | 2252 if (app_icon_loader->CanLoadImageForApp(app_id)) |
2254 return app_icon_loader.get(); | 2253 return app_icon_loader.get(); |
2255 } | 2254 } |
2256 | 2255 |
2257 return nullptr; | 2256 return nullptr; |
2258 } | 2257 } |
OLD | NEW |