~vanvugt/mir/mir-display-config-header

« back to all changes in this revision

Viewing changes to src/server/frontend/default_ipc_factory.cpp

  • Committer: Tarmac
  • Author(s): Christopher James Halse Rogers
  • Date: 2016-11-15 23:48:01 UTC
  • mfrom: (3730.3.26 reports-as-observers)
  • Revision ID: tarmac-20161115234801-2w603k4v3ffhfl3u
Replace the mir::Server-overridable Reports with Observers.

This resolves two problems:
1) It ensures that Mir will respect the various reporting options we provide, even when the shell wants to hook into some of the reports, and
2) It matches the semantic expectations around Reports vs Observers that (most of) the Mir team have. A couple of report call-sites which are unsafe for Observers are fixed in this branch.

Approved by mir-ci-bot, Kevin DuBois, Andreas Pokorny, Cemil Azizoglu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
mf::DefaultIpcFactory::DefaultIpcFactory(
37
37
    std::shared_ptr<Shell> const& shell,
38
 
    std::shared_ptr<SessionMediatorReport> const& sm_report,
 
38
    std::shared_ptr<SessionMediatorObserver> const& sm_observer,
39
39
    std::shared_ptr<mg::PlatformIpcOperations> const& platform_ipc_operations,
40
40
    std::shared_ptr<DisplayChanger> const& display_changer,
41
41
    std::shared_ptr<mg::GraphicBufferAllocator> const& buffer_allocator,
48
48
    std::shared_ptr<mir::input::InputDeviceHub> const& hub) :
49
49
    shell(shell),
50
50
    no_prompt_shell(std::make_shared<NoPromptShell>(shell)),
51
 
    sm_report(sm_report),
 
51
    sm_observer(sm_observer),
52
52
    cache(std::make_shared<ResourceCache>()),
53
53
    platform_ipc_operations(platform_ipc_operations),
54
54
    display_changer(display_changer),
97
97
        platform_ipc_operations,
98
98
        changer,
99
99
        buffer_allocator,
100
 
        sm_report,
 
100
        sm_observer,
101
101
        sink_factory,
102
102
        message_sender,
103
103
        effective_screencast,
114
114
    std::shared_ptr<mg::PlatformIpcOperations> const& platform_ipc_operations,
115
115
    std::shared_ptr<DisplayChanger> const& changer,
116
116
    std::shared_ptr<mg::GraphicBufferAllocator> const& buffer_allocator,
117
 
    std::shared_ptr<SessionMediatorReport> const& sm_report,
 
117
    std::shared_ptr<SessionMediatorObserver> const& sm_observer,
118
118
    std::shared_ptr<mf::EventSinkFactory> const& sink_factory,
119
119
    std::shared_ptr<mf::MessageSender> const& message_sender,
120
120
    std::shared_ptr<Screencast> const& effective_screencast,
126
126
        platform_ipc_operations,
127
127
        changer,
128
128
        buffer_allocator->supported_pixel_formats(),
129
 
        sm_report,
 
129
        sm_observer,
130
130
        sink_factory,
131
131
        message_sender,
132
132
        resource_cache(),