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

Unified Diff: ash/test/test_system_tray_delegate.cc

Issue 2148943002: mash: Create system tray display and rotation lock items via delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments, add rotation lock Created 4 years, 5 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 | « ash/test/test_system_tray_delegate.h ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/test_system_tray_delegate.cc
diff --git a/ash/test/test_system_tray_delegate.cc b/ash/test/test_system_tray_delegate.cc
index 6074b3928af2b501f544cea6b82e1ea66bc70655..4d812b50c014304801b85fe827e882dff7d311b1 100644
--- a/ash/test/test_system_tray_delegate.cc
+++ b/ash/test/test_system_tray_delegate.cc
@@ -13,6 +13,14 @@
#include "base/message_loop/message_loop.h"
#include "base/time/time.h"
+#if defined(OS_CHROMEOS)
+#include "ash/system/chromeos/rotation/tray_rotation_lock.h"
+#include "ash/system/chromeos/tray_display.h"
+#include "base/memory/ptr_util.h"
+#else
+#include "ash/common/system/tray/system_tray_item.h"
+#endif
+
namespace ash {
namespace test {
@@ -108,5 +116,23 @@ void TestSystemTrayDelegate::SignOut() {
base::MessageLoop::current()->QuitWhenIdle();
}
+std::unique_ptr<SystemTrayItem> TestSystemTrayDelegate::CreateDisplayTrayItem(
+ SystemTray* tray) {
+#if defined(OS_CHROMEOS)
+ return base::MakeUnique<TrayDisplay>(tray);
+#else
+ return nullptr;
+#endif
+}
+
+std::unique_ptr<SystemTrayItem>
+TestSystemTrayDelegate::CreateRotationLockTrayItem(SystemTray* tray) {
+#if defined(OS_CHROMEOS)
+ return base::MakeUnique<TrayRotationLock>(tray);
+#else
+ return nullptr;
+#endif
+}
+
} // namespace test
} // namespace ash
« no previous file with comments | « ash/test/test_system_tray_delegate.h ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698