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

Unified Diff: trunk/src/ash/test/test_shell_delegate.cc

Issue 14200038: Revert 194589 "Revert 194578 "Add ash SessionStateDelegate"" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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 | « trunk/src/ash/test/test_shell_delegate.h ('k') | trunk/src/ash/wm/event_client_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ash/test/test_shell_delegate.cc
===================================================================
--- trunk/src/ash/test/test_shell_delegate.cc (revision 194599)
+++ trunk/src/ash/test/test_shell_delegate.cc (working copy)
@@ -8,10 +8,13 @@
#include "ash/caps_lock_delegate_stub.h"
#include "ash/host/root_window_host_factory.h"
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/test/test_launcher_delegate.h"
+#include "ash/test/test_session_state_delegate.h"
#include "ash/wm/window_util.h"
+#include "base/logging.h"
#include "content/public/test/test_browser_context.h"
#include "ui/aura/window.h"
@@ -19,32 +22,17 @@
namespace test {
TestShellDelegate::TestShellDelegate()
- : locked_(false),
- session_started_(true),
- spoken_feedback_enabled_(false),
+ : spoken_feedback_enabled_(false),
high_contrast_enabled_(false),
screen_magnifier_enabled_(false),
screen_magnifier_type_(kDefaultMagnifierType),
- user_logged_in_(true),
- can_lock_screen_(true),
- num_exit_requests_(0) {
+ num_exit_requests_(0),
+ test_session_state_delegate_(NULL) {
}
TestShellDelegate::~TestShellDelegate() {
}
-bool TestShellDelegate::IsUserLoggedIn() const {
- return user_logged_in_;
-}
-
-bool TestShellDelegate::IsSessionStarted() const {
- return session_started_;
-}
-
-bool TestShellDelegate::IsGuestSession() const {
- return false;
-}
-
bool TestShellDelegate::IsFirstRunAfterBoot() const {
return false;
}
@@ -57,22 +45,6 @@
return false;
}
-bool TestShellDelegate::CanLockScreen() const {
- return user_logged_in_ && can_lock_screen_;
-}
-
-void TestShellDelegate::LockScreen() {
- locked_ = true;
-}
-
-void TestShellDelegate::UnlockScreen() {
- locked_ = false;
-}
-
-bool TestShellDelegate::IsScreenLocked() const {
- return locked_;
-}
-
void TestShellDelegate::PreInit() {
}
@@ -185,6 +157,12 @@
return new CapsLockDelegateStub;
}
+SessionStateDelegate* TestShellDelegate::CreateSessionStateDelegate() {
+ DCHECK(!test_session_state_delegate_);
+ test_session_state_delegate_ = new TestSessionStateDelegate();
+ return test_session_state_delegate_;
+}
+
aura::client::UserActionClient* TestShellDelegate::CreateUserActionClient() {
return NULL;
}
@@ -229,26 +207,13 @@
return RootWindowHostFactory::Create();
}
-void TestShellDelegate::SetSessionStarted(bool session_started) {
- session_started_ = session_started;
- if (session_started)
- user_logged_in_ = true;
-}
-
-void TestShellDelegate::SetUserLoggedIn(bool user_logged_in) {
- user_logged_in_ = user_logged_in;
- if (!user_logged_in)
- session_started_ = false;
-}
-
-void TestShellDelegate::SetCanLockScreen(bool can_lock_screen) {
- can_lock_screen_ = can_lock_screen;
-}
-
base::string16 TestShellDelegate::GetProductName() const {
return base::string16();
}
+TestSessionStateDelegate* TestShellDelegate::test_session_state_delegate() {
+ return test_session_state_delegate_;
+}
} // namespace test
} // namespace ash
Property changes on: trunk/src/ash/test/test_shell_delegate.cc
___________________________________________________________________
Added: svn:mergeinfo
« no previous file with comments | « trunk/src/ash/test/test_shell_delegate.h ('k') | trunk/src/ash/wm/event_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698