| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "remoting/host/curtain_mode.h" | 5 #include "remoting/host/curtain_mode.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace remoting { | 9 namespace remoting { |
| 10 | 10 |
| 11 class CurtainModeWin : public CurtainMode { | 11 class CurtainModeWin : public CurtainMode { |
| 12 public: | 12 public: |
| 13 CurtainModeWin() {} | 13 CurtainModeWin(const base::Closure& on_error) : on_error_(on_error) {} |
| 14 // Overriden from CurtainMode. | 14 // Overriden from CurtainMode. |
| 15 virtual void SetActivated(bool activated) OVERRIDE { | 15 virtual void SetActivated(bool activated) OVERRIDE { |
| 16 NOTIMPLEMENTED(); | 16 // Curtain-mode is not currently implemented for Windows. |
| 17 if (activated) { |
| 18 on_error_.Run(); |
| 19 } |
| 17 } | 20 } |
| 18 | 21 |
| 19 private: | 22 private: |
| 23 base::Closure on_error_; |
| 24 |
| 20 DISALLOW_COPY_AND_ASSIGN(CurtainModeWin); | 25 DISALLOW_COPY_AND_ASSIGN(CurtainModeWin); |
| 21 }; | 26 }; |
| 22 | 27 |
| 23 // static | 28 // static |
| 24 scoped_ptr<CurtainMode> CurtainMode::Create( | 29 scoped_ptr<CurtainMode> CurtainMode::Create( |
| 25 const base::Closure& on_session_activate, | 30 const base::Closure& on_session_activate, |
| 26 const base::Closure& on_error) { | 31 const base::Closure& on_error) { |
| 27 return scoped_ptr<CurtainMode>( | 32 return scoped_ptr<CurtainMode>( |
| 28 new CurtainModeWin()); | 33 new CurtainModeWin(on_error)); |
| 29 } | 34 } |
| 30 | 35 |
| 31 } // namespace remoting | 36 } // namespace remoting |
| OLD | NEW |