Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 1707773002: Revert of Remove HostDesktopType from AppLaunchParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-15
Patch Set: rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // The app will be created for the currently active profile. 782 // The app will be created for the currently active profile.
783 AppLaunchParams params(profile_, extension, 783 AppLaunchParams params(
784 ui::DispositionFromEventFlags(event_flags), 784 profile_, extension, ui::DispositionFromEventFlags(event_flags),
785 extensions::SOURCE_APP_LAUNCHER); 785 chrome::HOST_DESKTOP_TYPE_ASH, extensions::SOURCE_APP_LAUNCHER);
786 if (source != ash::LAUNCH_FROM_UNKNOWN && 786 if (source != ash::LAUNCH_FROM_UNKNOWN &&
787 app_id == extensions::kWebStoreAppId) { 787 app_id == extensions::kWebStoreAppId) {
788 // Get the corresponding source string. 788 // Get the corresponding source string.
789 std::string source_value = GetSourceFromAppListSource(source); 789 std::string source_value = GetSourceFromAppListSource(source);
790 790
791 // Set an override URL to include the source. 791 // Set an override URL to include the source.
792 GURL extension_url = extensions::AppLaunchInfo::GetFullLaunchURL(extension); 792 GURL extension_url = extensions::AppLaunchInfo::GetFullLaunchURL(extension);
793 params.override_url = net::AppendQueryParameter( 793 params.override_url = net::AppendQueryParameter(
794 extension_url, extension_urls::kWebstoreSourceField, source_value); 794 extension_url, extension_urls::kWebstoreSourceField, source_value);
795 } 795 }
(...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after
2224 void ChromeLauncherController::ReleaseProfile() { 2224 void ChromeLauncherController::ReleaseProfile() {
2225 if (app_sync_ui_state_) 2225 if (app_sync_ui_state_)
2226 app_sync_ui_state_->RemoveObserver(this); 2226 app_sync_ui_state_->RemoveObserver(this);
2227 2227
2228 extensions::ExtensionRegistry::Get(profile_)->RemoveObserver(this); 2228 extensions::ExtensionRegistry::Get(profile_)->RemoveObserver(this);
2229 2229
2230 PrefServiceSyncableFromProfile(profile_)->RemoveObserver(this); 2230 PrefServiceSyncableFromProfile(profile_)->RemoveObserver(this);
2231 2231
2232 pref_change_registrar_.RemoveAll(); 2232 pref_change_registrar_.RemoveAll();
2233 } 2233 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698