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

Unified Diff: ash/common/system/tiles/tiles_default_view.cc

Issue 2591553002: Remove non-cros support from ash/common/system. (Closed)
Patch Set: jc review + rebase Created 4 years 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 | « ash/common/system/system_notifier.cc ('k') | ash/common/system/tiles/tray_tiles_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tiles/tiles_default_view.cc
diff --git a/ash/common/system/tiles/tiles_default_view.cc b/ash/common/system/tiles/tiles_default_view.cc
index 6d4d66b30e595ad942f30dc2b95282d88258e842..12dd39432f4cf11cfdc19cf259dad5055b0f99a8 100644
--- a/ash/common/system/tiles/tiles_default_view.cc
+++ b/ash/common/system/tiles/tiles_default_view.cc
@@ -16,6 +16,8 @@
#include "ash/common/system/tray/tray_popup_utils.h"
#include "ash/common/wm_shell.h"
#include "ash/resources/vector_icons/vector_icons.h"
+#include "chromeos/dbus/dbus_thread_manager.h"
+#include "chromeos/dbus/session_manager_client.h"
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/geometry/insets.h"
@@ -24,11 +26,6 @@
#include "ui/views/controls/separator.h"
#include "ui/views/layout/box_layout.h"
-#if defined(OS_CHROMEOS)
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/session_manager_client.h"
-#endif
-
namespace {
// The ISO-639 code for the Hebrew locale. The help icon asset is a '?' which is
@@ -87,7 +84,6 @@ void TilesDefaultView::Init() {
AddChildView(help_button_);
AddChildView(TrayPopupUtils::CreateVerticalSeparator());
-#if !defined(OS_WIN)
lock_button_ =
new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED,
kSystemMenuLockIcon, IDS_ASH_STATUS_TRAY_LOCK);
@@ -106,7 +102,6 @@ void TilesDefaultView::Init() {
bool reboot = WmShell::Get()->shutdown_controller()->reboot_on_shutdown();
power_button_->SetTooltipText(l10n_util::GetStringUTF16(
reboot ? IDS_ASH_STATUS_TRAY_REBOOT : IDS_ASH_STATUS_TRAY_SHUTDOWN));
-#endif // !defined(OS_WIN)
}
void TilesDefaultView::ButtonPressed(views::Button* sender,
@@ -121,11 +116,9 @@ void TilesDefaultView::ButtonPressed(views::Button* sender,
shell->system_tray_controller()->ShowHelp();
} else if (sender == lock_button_) {
shell->RecordUserMetricsAction(UMA_TRAY_LOCK_SCREEN);
-#if defined(OS_CHROMEOS)
chromeos::DBusThreadManager::Get()
->GetSessionManagerClient()
->RequestLockScreen();
-#endif
} else if (sender == power_button_) {
shell->RecordUserMetricsAction(UMA_TRAY_SHUT_DOWN);
shell->RequestShutdown();
« no previous file with comments | « ash/common/system/system_notifier.cc ('k') | ash/common/system/tiles/tray_tiles_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698