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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/test/test_system_tray_delegate.h" 5 #include "ash/test/test_system_tray_delegate.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/common/login_status.h" 9 #include "ash/common/login_status.h"
10 #include "ash/common/session/session_state_delegate.h" 10 #include "ash/common/session/session_state_delegate.h"
11 #include "ash/common/wm_shell.h" 11 #include "ash/common/wm_shell.h"
12 #include "ash/shell.h" 12 #include "ash/shell.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 15
16 #if defined(OS_CHROMEOS)
17 #include "ash/system/chromeos/rotation/tray_rotation_lock.h"
18 #include "ash/system/chromeos/tray_display.h"
19 #include "base/memory/ptr_util.h"
20 #else
21 #include "ash/common/system/tray/system_tray_item.h"
22 #endif
23
16 namespace ash { 24 namespace ash {
17 namespace test { 25 namespace test {
18 26
19 namespace { 27 namespace {
20 28
21 bool g_system_update_required = false; 29 bool g_system_update_required = false;
22 LoginStatus g_initial_status = LoginStatus::USER; 30 LoginStatus g_initial_status = LoginStatus::USER;
23 31
24 } // namespace 32 } // namespace
25 33
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 base::TimeDelta* session_length_limit) { 109 base::TimeDelta* session_length_limit) {
102 if (session_length_limit_set_) 110 if (session_length_limit_set_)
103 *session_length_limit = session_length_limit_; 111 *session_length_limit = session_length_limit_;
104 return session_length_limit_set_; 112 return session_length_limit_set_;
105 } 113 }
106 114
107 void TestSystemTrayDelegate::SignOut() { 115 void TestSystemTrayDelegate::SignOut() {
108 base::MessageLoop::current()->QuitWhenIdle(); 116 base::MessageLoop::current()->QuitWhenIdle();
109 } 117 }
110 118
119 std::unique_ptr<SystemTrayItem> TestSystemTrayDelegate::CreateDisplayTrayItem(
120 SystemTray* tray) {
121 #if defined(OS_CHROMEOS)
122 return base::MakeUnique<TrayDisplay>(tray);
123 #else
124 return nullptr;
125 #endif
126 }
127
128 std::unique_ptr<SystemTrayItem>
129 TestSystemTrayDelegate::CreateRotationLockTrayItem(SystemTray* tray) {
130 #if defined(OS_CHROMEOS)
131 return base::MakeUnique<TrayRotationLock>(tray);
132 #else
133 return nullptr;
134 #endif
135 }
136
111 } // namespace test 137 } // namespace test
112 } // namespace ash 138 } // namespace ash
OLDNEW
« 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