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

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

Issue 2729363002: chromeos: Move files in //ash/common to //ash, part 3 (Closed)
Patch Set: Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/views/apps/app_info_dialog/app_info_footer_panel.h" 5 #include "chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/browser_dialogs.h" 8 #include "chrome/browser/ui/browser_dialogs.h"
9 #include "chrome/common/extensions/extension_constants.h" 9 #include "chrome/common/extensions/extension_constants.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
11 #include "extensions/browser/extension_system.h" 11 #include "extensions/browser/extension_system.h"
12 #include "extensions/browser/management_policy.h" 12 #include "extensions/browser/management_policy.h"
13 #include "extensions/browser/uninstall_reason.h" 13 #include "extensions/browser/uninstall_reason.h"
14 #include "extensions/common/extension.h" 14 #include "extensions/common/extension.h"
15 #include "ui/base/l10n/l10n_util.h" 15 #include "ui/base/l10n/l10n_util.h"
16 #include "ui/events/event.h" 16 #include "ui/events/event.h"
17 #include "ui/views/controls/button/md_text_button.h" 17 #include "ui/views/controls/button/md_text_button.h"
18 #include "ui/views/layout/box_layout.h" 18 #include "ui/views/layout/box_layout.h"
19 #include "ui/views/layout/layout_constants.h" 19 #include "ui/views/layout/layout_constants.h"
20 #include "ui/views/view.h" 20 #include "ui/views/view.h"
21 #include "ui/views/widget/widget.h" 21 #include "ui/views/widget/widget.h"
22 22
23 #if defined(USE_ASH) 23 #if defined(USE_ASH)
24 #include "ash/common/wm_shell.h" // nogncheck
25 #include "ash/shelf/shelf_delegate.h" // nogncheck 24 #include "ash/shelf/shelf_delegate.h" // nogncheck
25 #include "ash/wm_shell.h" // nogncheck
26 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h" // nogncheck 26 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h" // nogncheck
27 #endif 27 #endif
28 28
29 AppInfoFooterPanel::AppInfoFooterPanel(gfx::NativeWindow parent_window, 29 AppInfoFooterPanel::AppInfoFooterPanel(gfx::NativeWindow parent_window,
30 Profile* profile, 30 Profile* profile,
31 const extensions::Extension* app) 31 const extensions::Extension* app)
32 : AppInfoPanel(profile, app), 32 : AppInfoPanel(profile, app),
33 parent_window_(parent_window), 33 parent_window_(parent_window),
34 create_shortcuts_button_(NULL), 34 create_shortcuts_button_(NULL),
35 pin_to_shelf_button_(NULL), 35 pin_to_shelf_button_(NULL),
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 app_, extensions::UNINSTALL_REASON_USER_INITIATED, 184 app_, extensions::UNINSTALL_REASON_USER_INITIATED,
185 extensions::UNINSTALL_SOURCE_APP_INFO_DIALOG); 185 extensions::UNINSTALL_SOURCE_APP_INFO_DIALOG);
186 } 186 }
187 187
188 bool AppInfoFooterPanel::CanUninstallApp() const { 188 bool AppInfoFooterPanel::CanUninstallApp() const {
189 extensions::ManagementPolicy* policy = 189 extensions::ManagementPolicy* policy =
190 extensions::ExtensionSystem::Get(profile_)->management_policy(); 190 extensions::ExtensionSystem::Get(profile_)->management_policy();
191 return policy->UserMayModifySettings(app_, nullptr) && 191 return policy->UserMayModifySettings(app_, nullptr) &&
192 !policy->MustRemainInstalled(app_, nullptr); 192 !policy->MustRemainInstalled(app_, nullptr);
193 } 193 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698