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

Side by Side Diff: chrome/browser/ui/extensions/application_launch.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/application_launch.h" 5 #include "chrome/browser/ui/extensions/application_launch.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "apps/launcher.h" 9 #include "apps/launcher.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "chrome/browser/ui/browser_commands_mac.h" 48 #include "chrome/browser/ui/browser_commands_mac.h"
49 #endif 49 #endif
50 50
51 using content::WebContents; 51 using content::WebContents;
52 using extensions::Extension; 52 using extensions::Extension;
53 using extensions::ExtensionPrefs; 53 using extensions::ExtensionPrefs;
54 using extensions::ExtensionRegistry; 54 using extensions::ExtensionRegistry;
55 55
56 namespace { 56 namespace {
57 57
58 // Shows the app list for |desktop_type| and returns the app list's window. 58 // Shows the app list and returns the app list's window.
59 gfx::NativeWindow ShowAppListAndGetNativeWindow() { 59 gfx::NativeWindow ShowAppListAndGetNativeWindow() {
60 AppListService* app_list_service = AppListService::Get(); 60 AppListService* app_list_service = AppListService::Get();
61 app_list_service->Show(); 61 app_list_service->Show();
62 return app_list_service->GetAppListWindow(); 62 return app_list_service->GetAppListWindow();
63 } 63 }
64 64
65 // Attempts to launch an app, prompting the user to enable it if necessary. If 65 // Attempts to launch an app, prompting the user to enable it if necessary. If
66 // a prompt is required it will be shown inside the window returned by 66 // a prompt is required it will be shown inside the window returned by
67 // |parent_window_getter|. 67 // |parent_window_getter|.
68 // This class manages its own lifetime. 68 // This class manages its own lifetime.
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 extensions::TabHelper::FromWebContents(tab)->UpdateShortcutOnLoadComplete(); 408 extensions::TabHelper::FromWebContents(tab)->UpdateShortcutOnLoadComplete();
409 409
410 return tab; 410 return tab;
411 } 411 }
412 412
413 bool CanLaunchViaEvent(const extensions::Extension* extension) { 413 bool CanLaunchViaEvent(const extensions::Extension* extension) {
414 const extensions::Feature* feature = 414 const extensions::Feature* feature =
415 extensions::FeatureProvider::GetAPIFeature("app.runtime"); 415 extensions::FeatureProvider::GetAPIFeature("app.runtime");
416 return feature->IsAvailableToExtension(extension).is_available(); 416 return feature->IsAvailableToExtension(extension).is_available();
417 } 417 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/app_launch_params.cc ('k') | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698