~tatokis/unity/gcc-72-errors

« back to all changes in this revision

Viewing changes to lockscreen/LockScreenAbstractPromptView.h

  • Committer: Bileto Bot
  • Author(s): Andrea Azzarone
  • Date: 2017-09-25 16:03:52 UTC
  • mfrom: (4253.3.3 fix-missing-entry-lockscreen)
  • Revision ID: ci-train-bot@canonical.com-20170925160352-kqd3v7i3wdwhixjn
Refactor the way UserAuthenticator is created and passed around. Handle failures to create new threads and fallback to a "Switch to greeter..." button in case of failure. (LP: #1311316)

Approved by: Marco Trevisan (Treviño)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <Nux/VLayout.h>
30
30
#include "UnityCore/SessionManager.h"
31
31
 
32
 
#include "UserAuthenticatorPam.h"
 
32
#include "UserAuthenticator.h"
33
33
#include "unity-shared/IMTextEntry.h"
34
34
 
35
35
namespace nux
48
48
class AbstractUserPromptView : public nux::View
49
49
{
50
50
public:
51
 
  AbstractUserPromptView(session::Manager::Ptr const& session_manager)
 
51
  AbstractUserPromptView(session::Manager::Ptr const& session_manager,
 
52
                         UserAuthenticator::Ptr const& user_authenticator)
52
53
    : nux::View(NUX_TRACKER_LOCATION)
53
54
    , scale(1.0)
54
55
    , session_manager_(session_manager)
 
56
    , user_authenticator_(user_authenticator)
55
57
  {}
56
58
 
57
59
  nux::Property<double> scale;
64
66
 
65
67
protected:
66
68
  session::Manager::Ptr session_manager_;
67
 
  UserAuthenticatorPam user_authenticator_;
 
69
  UserAuthenticator::Ptr user_authenticator_;
68
70
  std::shared_ptr<nux::AbstractPaintLayer> bg_layer_;
69
71
  StaticCairoText* username_;
70
72
  nux::VLayout* msg_layout_;