~mir-team/unity-mir/staged-next-rev

« back to all changes in this revision

Viewing changes to src/unity-mir/shellserverconfiguration.cpp

  • Committer: Michael Terry
  • Date: 2014-02-18 22:20:29 UTC
  • mfrom: (180 unity-mir)
  • mto: This revision was merged to the branch mainline in revision 182.
  • Revision ID: michael.terry@canonical.com-20140218222029-wfltid653bs70r52
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2013 Canonical, Ltd.
 
2
 * Copyright (C) 2013-2014 Canonical, Ltd.
3
3
 *
4
4
 * This program is free software: you can redistribute it and/or modify it under
5
5
 * the terms of the GNU Lesser General Public License version 3, as published by
16
16
 
17
17
#include "shellserverconfiguration.h"
18
18
 
 
19
#include "unityprotobufservice.h"
19
20
#include "initialsurfaceplacementstrategy.h"
20
21
#include "serverstatuslistener.h"
 
22
#include "sessioncreator.h"
21
23
#include "sessionlistener.h"
22
24
#include "surfaceconfigurator.h"
23
25
#include "surfacefactory.h"
30
32
ShellServerConfiguration::ShellServerConfiguration(int argc, char const* argv[], QObject* parent)
31
33
    : QObject(parent)
32
34
    , DefaultServerConfiguration(argc, argv)
 
35
    , m_unityService(std::make_shared<UnityProtobufService>())
33
36
{
34
37
    DLOG("ShellServerConfiguration created");
35
38
}
78
81
    });
79
82
}
80
83
 
 
84
std::shared_ptr<mir::frontend::SessionCreator>
 
85
ShellServerConfiguration::the_session_creator()
 
86
{
 
87
    return session_creator([this]
 
88
        {
 
89
            return std::make_shared<SessionCreator>(
 
90
                m_unityService,
 
91
                the_ipc_factory(the_frontend_shell(), the_buffer_allocator()),
 
92
                the_session_authorizer(),
 
93
                the_message_processor_report());
 
94
        });
 
95
}
 
96
 
81
97
// FIXME: Needed to detect the shell's surface - there must be a better way
82
98
std::shared_ptr<msh::SurfaceFactory>
83
99
ShellServerConfiguration::the_shell_surface_factory()