blob: 96b07710d3909d27b83f107cc71d934529d14ed0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/session_state_observer.h"
#include "ash/session_state_delegate.h"
#include "ash/shell.h"
namespace ash {
ScopedSessionStateObserver::ScopedSessionStateObserver(
ash::SessionStateObserver* observer) : observer_(observer) {
ash::Shell::GetInstance()->session_state_delegate()->
AddSessionStateObserver(observer_);
}
ScopedSessionStateObserver::~ScopedSessionStateObserver() {
ash::Shell::GetInstance()->session_state_delegate()->
RemoveSessionStateObserver(observer_);
}
} // namespace ash
|