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

Unified Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc

Issue 1702523002: Remove HostDesktopType from c/b/ui/views/apps/app_info_dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-29
Patch Set: include 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
index 050de03cfdc3b06845411a3b70cc10cdb1ba1955..5fde3e82a9101d81c8357154ab99278aca87764f 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
@@ -7,7 +7,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
#include "chrome/browser/ui/browser_dialogs.h"
-#include "chrome/browser/ui/host_desktop.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/grit/generated_resources.h"
#include "extensions/browser/extension_system.h"
@@ -143,11 +142,13 @@ void AppInfoFooterPanel::CreateShortcuts() {
}
bool AppInfoFooterPanel::CanCreateShortcuts() const {
- // Ash platforms can't create shortcuts. Extensions and the Chrome
- // component app can't have shortcuts.
- return app_->id() != extension_misc::kChromeAppId && !app_->is_extension() &&
- (chrome::GetHostDesktopTypeForNativeWindow(parent_window_) !=
- chrome::HOST_DESKTOP_TYPE_ASH);
+#if defined(USE_ASH)
+ // Ash platforms can't create shortcuts.
+ return false;
+#else
+ // Extensions and the Chrome component app can't have shortcuts.
+ return app_->id() != extension_misc::kChromeAppId && !app_->is_extension();
+#endif // USE_ASH
}
void AppInfoFooterPanel::SetPinnedToShelf(bool value) {
@@ -171,11 +172,8 @@ void AppInfoFooterPanel::SetPinnedToShelf(bool value) {
bool AppInfoFooterPanel::CanSetPinnedToShelf() const {
#if defined(USE_ASH)
// Non-Ash platforms don't have a shelf.
- if (!ash::Shell::HasInstance() ||
- chrome::GetHostDesktopTypeForNativeWindow(parent_window_) !=
- chrome::HOST_DESKTOP_TYPE_ASH) {
+ if (!ash::Shell::HasInstance())
return false;
- }
// The Chrome app can't be unpinned, and extensions can't be pinned.
return app_->id() != extension_misc::kChromeAppId && !app_->is_extension() &&
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698