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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_FLOW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_FLOW_H_
10 #include "base/basictypes.h"
17 // Class that holds the logic of interpreting screen outcomes and moving between
22 virtual ~ScreenFlow();
24 // Called once the flow is set as a flow for specific screen manager.
25 // Should usually result in get_manager()->ShowScreen call.
26 virtual void Start() = 0;
28 // Called when screen with |screen_id| finishes with |outcome|.
29 // Additional result parameters may be passed via |context| (always not NULL).
30 // Should result in get_manager()->ShowScreen call or in
31 // get_manager()->SetScreenFlow call.
32 virtual void OnScreenFinished(const std::string
& screen_id
,
33 const std::string
& outcome
,
34 ScreenContext
* context
) = 0;
36 ScreenManager
* screen_manager() { return manager_
; }
39 friend class ScreenManager
;
41 void set_screen_manager(ScreenManager
* manager
) {
45 // Screen manager associated with this flow. Set by screen manager itself.
46 ScreenManager
* manager_
;
48 DISALLOW_COPY_AND_ASSIGN(ScreenFlow
);
51 } // namespace chromeos
53 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_FLOW_H_