Mir

Merge lp:~alan-griffiths/mir/refactor-frontend-cleanup into lp:~mir-team/mir/trunk

Proposed by Alan Griffiths
Status: Merged
Approved by: Martin Mrazik
Approved revision: no longer in the source branch.
Merged at revision: 503
Proposed branch: lp:~alan-griffiths/mir/refactor-frontend-cleanup
Merge into: lp:~mir-team/mir/trunk
Diff against target: 3679 lines (+639/-616)
76 files modified
examples/render_surfaces.cpp (+2/-2)
include/server/mir/default_server_configuration.h (+8/-7)
include/server/mir/frontend/session.h (+6/-7)
include/server/mir/frontend/session_container.h (+9/-5)
include/server/mir/frontend/session_mediator.h (+15/-18)
include/server/mir/frontend/session_mediator_report.h (+31/-31)
include/server/mir/frontend/shell.h (+9/-9)
include/server/mir/frontend/surface.h (+4/-4)
include/server/mir/frontend/surface_id.h (+4/-4)
include/server/mir/logging/session_mediator_report.h (+20/-20)
include/server/mir/server_configuration.h (+2/-6)
include/server/mir/shell/application_session.h (+8/-8)
include/server/mir/shell/consuming_placement_strategy.h (+1/-1)
include/server/mir/shell/focus_sequence.h (+8/-4)
include/server/mir/shell/focus_setter.h (+6/-2)
include/server/mir/shell/organising_surface_factory.h (+2/-2)
include/server/mir/shell/placement_strategy.h (+6/-2)
include/server/mir/shell/registration_order_focus_sequence.h (+3/-3)
include/server/mir/shell/session_manager.h (+9/-9)
include/server/mir/shell/single_visibility_focus_mechanism.h (+5/-2)
include/server/mir/shell/surface_creation_parameters.h (+1/-1)
include/server/mir/shell/surface_factory.h (+6/-4)
include/server/mir/surfaces/surface_controller.h (+1/-3)
include/server/mir/surfaces/surface_stack.h (+2/-2)
include/server/mir/surfaces/surface_stack_model.h (+2/-2)
include/test/mir_test_cucumber/session_management_context.h (+5/-5)
include/test/mir_test_doubles/mock_session.h (+5/-5)
include/test/mir_test_doubles/mock_shell.h (+8/-8)
include/test/mir_test_doubles/mock_surface.h (+2/-2)
include/test/mir_test_doubles/mock_surface_factory.h (+1/-1)
include/test/mir_test_doubles/stub_session.h (+12/-12)
include/test/mir_test_doubles/stub_shell.h (+8/-8)
src/server/default_server_configuration.cpp (+24/-24)
src/server/display_server.cpp (+4/-4)
src/server/frontend/CMakeLists.txt (+5/-4)
src/server/frontend/make_protobuf_binder_communicator.cpp (+1/-1)
src/server/frontend/make_protobuf_socket_communicator.cpp (+1/-1)
src/server/frontend/null_session_mediator_report.cpp (+27/-27)
src/server/frontend/session_mediator.cpp (+38/-40)
src/server/frontend/session_mediator_android.cpp (+6/-6)
src/server/frontend/session_mediator_gbm.cpp (+6/-6)
src/server/frontend/surface_creation_parameters.cpp (+12/-12)
src/server/logging/CMakeLists.txt (+1/-1)
src/server/logging/session_mediator_report.cpp (+34/-34)
src/server/shell/CMakeLists.txt (+0/-1)
src/server/shell/application_session.cpp (+8/-7)
src/server/shell/consuming_placement_strategy.cpp (+2/-1)
src/server/shell/organising_surface_factory.cpp (+2/-1)
src/server/shell/registration_order_focus_sequence.cpp (+12/-11)
src/server/shell/session_container.cpp (+6/-5)
src/server/shell/session_manager.cpp (+7/-6)
src/server/shell/single_visibility_focus_mechanism.cpp (+5/-4)
src/server/surfaces/proxy_surface.cpp (+1/-1)
src/server/surfaces/proxy_surface.h (+5/-5)
src/server/surfaces/surface_controller.cpp (+3/-4)
src/server/surfaces/surface_stack.cpp (+1/-1)
tests/acceptance-tests/test_focus_management_api.cpp (+28/-27)
tests/behavior-tests/session_management_context.cpp (+13/-12)
tests/integration-tests/cucumber/test_session_management_context.cpp (+24/-25)
tests/integration-tests/frontend/test_application_mediator_report.cpp (+35/-35)
tests/integration-tests/frontend/test_session_manager.cpp (+5/-4)
tests/integration-tests/test_error_reporting.cpp (+1/-1)
tests/unit-tests/frontend/CMakeLists.txt (+3/-3)
tests/unit-tests/frontend/test_session_mediator.cpp (+20/-20)
tests/unit-tests/frontend/test_session_mediator_android.cpp (+13/-13)
tests/unit-tests/frontend/test_session_mediator_gbm.cpp (+14/-14)
tests/unit-tests/shell/test_application_session.cpp (+5/-4)
tests/unit-tests/shell/test_consuming_placement_strategy.cpp (+4/-3)
tests/unit-tests/shell/test_organising_surface_factory.cpp (+6/-5)
tests/unit-tests/shell/test_registration_order_focus_sequence.cpp (+1/-1)
tests/unit-tests/shell/test_session_manager.cpp (+16/-15)
tests/unit-tests/shell/test_single_visibility_focus_mechanism.cpp (+1/-1)
tests/unit-tests/shell/test_the_session_container_implementation.cpp (+3/-2)
tests/unit-tests/surfaces/test_proxy_surface.cpp (+5/-5)
tests/unit-tests/surfaces/test_surface.cpp (+8/-8)
tests/unit-tests/surfaces/test_surface_stack.cpp (+12/-12)
To merge this branch: bzr merge lp:~alan-griffiths/mir/refactor-frontend-cleanup
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Kevin DuBois (community) Approve
Alexandros Frantzis (community) Approve
Review via email: mp+153386@code.launchpad.net

Commit message

frontend, shell, logging, tests: refactoring to clarify roles in frontend and dependencies on shell

Description of the change

frontend, shell, logging, tests: refactoring to clarify roles in frontend and dependencies on shell

This is most of the the refactoring discussed on mir-devel - but leaves out the last bit about surfaces::ProxySurface as that conflicts with stuff Daniel is trying to land.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Proper use of "using namespace ..." would prevent us from constantly having large diffs of namespace refactoring. I am regularly seeing proposals that change "abc::Something" into "def::Something" in many locations.

This not only creates large diffs but you still have the problem of abbreviated namespace aliases being incomprehensible to most people: msh, mf, etc.

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

grep -R session_store src/ include/ tests/ uncovers some remaining pending renames.

The most interesting is at tests/acceptance-tests/test_focus_management_api.cpp line 158, where we are definining a new method ("override" anyone? ;)), and have essentially nullified that particular test.

review: Needs Fixing
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> grep -R session_store src/ include/ tests/ uncovers some remaining pending
> renames.
>
> The most interesting is at tests/acceptance-
> tests/test_focus_management_api.cpp line 158, where we are definining a new
> method ("override" anyone? ;)), and have essentially nullified that particular
> test.

How did I miss all those?!

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Looks good.

review: Approve
Revision history for this message
Kevin DuBois (kdub) wrote :

looks good to me too

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/mir-autolanding/41/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/mir-quantal-amd64-autolanding/42/console

review: Needs Fixing (continuous-integration)
Revision history for this message
Martin Mrazik (mrazik) wrote :

Sorry. Space issues on the builder. Should be fixed -> reapproving.

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/render_surfaces.cpp'
2--- examples/render_surfaces.cpp 2013-03-07 08:04:05 +0000
3+++ examples/render_surfaces.cpp 2013-03-15 13:09:22 +0000
4@@ -48,7 +48,7 @@
5 namespace mc=mir::compositor;
6 namespace ml=mir::logging;
7 namespace ms=mir::surfaces;
8-namespace msh = mir::shell;
9+namespace mf = mir::frontend;
10 namespace geom=mir::geometry;
11 namespace mt=mir::tools;
12
13@@ -233,7 +233,7 @@
14 const float angular_step = 2.0 * M_PI / num_moveables;
15
16 std::shared_ptr<ms::Surface> s = surface_stack->create_surface(
17- msh::a_surface().of_size({geom::Width{surface_size}, geom::Height{surface_size}})
18+ mf::a_surface().of_size({geom::Width{surface_size}, geom::Height{surface_size}})
19 .of_pixel_format(buffer_allocator->supported_pixel_formats()[0])
20 .of_buffer_usage(mc::BufferUsage::hardware)
21 ).lock();
22
23=== modified file 'include/server/mir/default_server_configuration.h'
24--- include/server/mir/default_server_configuration.h 2013-03-08 07:20:43 +0000
25+++ include/server/mir/default_server_configuration.h 2013-03-15 13:09:22 +0000
26@@ -38,14 +38,15 @@
27 }
28 namespace frontend
29 {
30+class Shell;
31 class Communicator;
32 class ProtobufIpcFactory;
33-class ApplicationMediatorReport;
34+class SessionMediatorReport;
35 }
36
37 namespace shell
38 {
39-class SessionStore;
40+class SessionManager;
41 class SurfaceFactory;
42 }
43 namespace surfaces
44@@ -93,9 +94,9 @@
45 virtual std::shared_ptr<compositor::RenderView> the_render_view();
46
47 virtual std::shared_ptr<frontend::Communicator> the_communicator();
48- virtual std::shared_ptr<frontend::ApplicationMediatorReport> the_application_mediator_report();
49+ virtual std::shared_ptr<frontend::SessionMediatorReport> the_session_mediator_report();
50
51- virtual std::shared_ptr<shell::SessionStore> the_session_store();
52+ virtual std::shared_ptr<frontend::Shell> the_frontend_shell();
53 virtual std::shared_ptr<shell::SurfaceFactory> the_surface_factory();
54
55 virtual std::shared_ptr<surfaces::BufferBundleFactory> the_buffer_bundle_factory();
56@@ -110,7 +111,7 @@
57 virtual std::shared_ptr<options::Option> the_options() const;
58
59 CachedPtr<frontend::Communicator> communicator;
60- CachedPtr<shell::SessionStore> session_store;
61+ CachedPtr<frontend::Shell> session_manager;
62 CachedPtr<input::InputManager> input_manager;
63 CachedPtr<graphics::Platform> graphics_platform;
64 CachedPtr<graphics::BufferInitializer> buffer_initializer;
65@@ -118,7 +119,7 @@
66 CachedPtr<graphics::Display> display;
67
68 CachedPtr<frontend::ProtobufIpcFactory> ipc_factory;
69- CachedPtr<frontend::ApplicationMediatorReport> application_mediator_report;
70+ CachedPtr<frontend::SessionMediatorReport> session_mediator_report;
71 CachedPtr<compositor::BufferAllocationStrategy> buffer_allocation_strategy;
72 CachedPtr<graphics::Renderer> renderer;
73 CachedPtr<compositor::BufferBundleManager> buffer_bundle_manager;
74@@ -133,7 +134,7 @@
75
76 // the communications interface to use
77 virtual std::shared_ptr<frontend::ProtobufIpcFactory> the_ipc_factory(
78- std::shared_ptr<shell::SessionStore> const& session_store,
79+ std::shared_ptr<frontend::Shell> const& shell,
80 std::shared_ptr<graphics::ViewableArea> const& display,
81 std::shared_ptr<compositor::GraphicBufferAllocator> const& allocator);
82
83
84=== renamed file 'include/server/mir/shell/session.h' => 'include/server/mir/frontend/session.h'
85--- include/server/mir/shell/session.h 2013-03-07 08:04:05 +0000
86+++ include/server/mir/frontend/session.h 2013-03-15 13:09:22 +0000
87@@ -16,10 +16,10 @@
88 * Authored By: Robert Carr <racarr@canonical.com>
89 */
90
91-#ifndef MIR_SHELL_SESSION_H_
92-#define MIR_SHELL_SESSION_H_
93+#ifndef MIR_FRONTEND_SESSION_H_
94+#define MIR_FRONTEND_SESSION_H_
95
96-#include "mir/shell/surface_id.h"
97+#include "mir/frontend/surface_id.h"
98
99 #include <mutex>
100 #include <atomic>
101@@ -29,11 +29,10 @@
102 namespace mir
103 {
104
105-/// Management of client application shell
106-namespace shell
107+namespace frontend
108 {
109 class Surface;
110-class SurfaceCreationParameters;
111+struct SurfaceCreationParameters;
112
113 class Session
114 {
115@@ -59,4 +58,4 @@
116 }
117 }
118
119-#endif // MIR_SHELL_SESSION_H_
120+#endif // MIR_FRONTEND_SESSION_H_
121
122=== renamed file 'include/server/mir/shell/session_container.h' => 'include/server/mir/frontend/session_container.h'
123--- include/server/mir/shell/session_container.h 2013-03-07 08:04:05 +0000
124+++ include/server/mir/frontend/session_container.h 2013-03-15 13:09:22 +0000
125@@ -25,9 +25,13 @@
126
127 namespace mir
128 {
129+namespace frontend
130+{
131+class Session;
132+}
133+
134 namespace shell
135 {
136-class Session;
137
138 class SessionContainer
139 {
140@@ -35,16 +39,16 @@
141 SessionContainer();
142 ~SessionContainer();
143
144- virtual void insert_session(std::shared_ptr<Session> const& session);
145- virtual void remove_session(std::shared_ptr<Session> const& session);
146+ virtual void insert_session(std::shared_ptr<frontend::Session> const& session);
147+ virtual void remove_session(std::shared_ptr<frontend::Session> const& session);
148
149- void for_each(std::function<void(std::shared_ptr<Session> const&)> f) const;
150+ void for_each(std::function<void(std::shared_ptr<frontend::Session> const&)> f) const;
151
152 private:
153 SessionContainer(const SessionContainer&) = delete;
154 SessionContainer& operator=(const SessionContainer&) = delete;
155
156- std::vector<std::shared_ptr<Session>> apps;
157+ std::vector<std::shared_ptr<frontend::Session>> apps;
158 mutable std::mutex guard;
159 };
160
161
162=== renamed file 'include/server/mir/frontend/application_mediator.h' => 'include/server/mir/frontend/session_mediator.h'
163--- include/server/mir/frontend/application_mediator.h 2013-03-07 08:04:05 +0000
164+++ include/server/mir/frontend/session_mediator.h 2013-03-15 13:09:22 +0000
165@@ -17,8 +17,8 @@
166 */
167
168
169-#ifndef MIR_FRONTEND_APPLICATION_MEDIATOR_H_
170-#define MIR_FRONTEND_APPLICATION_MEDIATOR_H_
171+#ifndef MIR_FRONTEND_SESSION_MEDIATOR_H_
172+#define MIR_FRONTEND_SESSION_MEDIATOR_H_
173
174 #include "mir_protobuf.pb.h"
175
176@@ -38,30 +38,27 @@
177 class GraphicBufferAllocator;
178 }
179
180-namespace shell
181-{
182-class SessionStore;
183-class Session;
184-}
185
186 /// Frontend interface. Mediates the interaction between client
187-/// applications and the core of the mir system.
188+/// processes and the core of the mir system.
189 namespace frontend
190 {
191+class Shell;
192+class Session;
193 class ResourceCache;
194-class ApplicationMediatorReport;
195+class SessionMediatorReport;
196
197-// ApplicationMediator relays requests from the client into the server process.
198-class ApplicationMediator : public mir::protobuf::DisplayServer
199+// SessionMediator relays requests from the client process into the server.
200+class SessionMediator : public mir::protobuf::DisplayServer
201 {
202 public:
203
204- ApplicationMediator(
205- std::shared_ptr<shell::SessionStore> const& session_store,
206+ SessionMediator(
207+ std::shared_ptr<Shell> const& shell,
208 std::shared_ptr<graphics::Platform> const& graphics_platform,
209 std::shared_ptr<graphics::ViewableArea> const& viewable_area,
210 std::shared_ptr<compositor::GraphicBufferAllocator> const& buffer_allocator,
211- std::shared_ptr<ApplicationMediatorReport> const& report,
212+ std::shared_ptr<SessionMediatorReport> const& report,
213 std::shared_ptr<ResourceCache> const& resource_cache);
214
215 /* Platform independent requests */
216@@ -104,7 +101,7 @@
217 google::protobuf::Closure* done);
218
219 private:
220- std::shared_ptr<shell::SessionStore> const session_store;
221+ std::shared_ptr<Shell> const shell;
222 std::shared_ptr<graphics::Platform> const graphics_platform;
223
224 // TODO this is a dubious dependency - to get display_info (is there only one?)
225@@ -112,14 +109,14 @@
226 // TODO this is a dubious dependency - to get supported_pixel_formats
227 std::shared_ptr<compositor::GraphicBufferAllocator> const buffer_allocator;
228
229- std::shared_ptr<ApplicationMediatorReport> const report;
230+ std::shared_ptr<SessionMediatorReport> const report;
231 std::shared_ptr<ResourceCache> const resource_cache;
232
233- std::shared_ptr<shell::Session> application_session;
234+ std::shared_ptr<Session> session;
235 };
236
237 }
238 }
239
240
241-#endif /* MIR_FRONTEND_APPLICATION_MEDIATOR_H_ */
242+#endif /* MIR_FRONTEND_SESSION_MEDIATOR_H_ */
243
244=== renamed file 'include/server/mir/frontend/application_mediator_report.h' => 'include/server/mir/frontend/session_mediator_report.h'
245--- include/server/mir/frontend/application_mediator_report.h 2013-03-07 08:04:05 +0000
246+++ include/server/mir/frontend/session_mediator_report.h 2013-03-15 13:09:22 +0000
247@@ -17,8 +17,8 @@
248 */
249
250
251-#ifndef MIR_FRONTEND_APPLICATION_MEDIATOR_REPORT_H_
252-#define MIR_FRONTEND_APPLICATION_MEDIATOR_REPORT_H_
253+#ifndef MIR_FRONTEND_SESSION_MEDIATOR_REPORT_H_
254+#define MIR_FRONTEND_SESSION_MEDIATOR_REPORT_H_
255
256 #include <string>
257
258@@ -27,43 +27,43 @@
259 namespace frontend
260 {
261 // Interface for monitoring application activity
262-class ApplicationMediatorReport
263+class SessionMediatorReport
264 {
265 public:
266- virtual void application_connect_called(std::string const& app_name) = 0;
267-
268- virtual void application_create_surface_called(std::string const& app_name) = 0;
269-
270- virtual void application_next_buffer_called(std::string const& app_name) = 0;
271-
272- virtual void application_release_surface_called(std::string const& app_name) = 0;
273-
274- virtual void application_disconnect_called(std::string const& app_name) = 0;
275-
276- virtual void application_drm_auth_magic_called(std::string const& app_name) = 0;
277-
278- virtual void application_error(
279+ virtual void session_connect_called(std::string const& app_name) = 0;
280+
281+ virtual void session_create_surface_called(std::string const& app_name) = 0;
282+
283+ virtual void session_next_buffer_called(std::string const& app_name) = 0;
284+
285+ virtual void session_release_surface_called(std::string const& app_name) = 0;
286+
287+ virtual void session_disconnect_called(std::string const& app_name) = 0;
288+
289+ virtual void session_drm_auth_magic_called(std::string const& app_name) = 0;
290+
291+ virtual void session_error(
292 std::string const& app_name,
293 char const* method,
294 std::string const& what) = 0;
295 };
296
297 // Do-nothing implementation to satisfy dependencies
298-class NullApplicationMediatorReport : public ApplicationMediatorReport
299+class NullSessionMediatorReport : public SessionMediatorReport
300 {
301- virtual void application_connect_called(std::string const& app_name);
302-
303- virtual void application_create_surface_called(std::string const& app_name);
304-
305- virtual void application_next_buffer_called(std::string const& app_name);
306-
307- virtual void application_release_surface_called(std::string const& app_name);
308-
309- virtual void application_disconnect_called(std::string const& app_name);
310-
311- virtual void application_drm_auth_magic_called(std::string const& app_name);
312-
313- virtual void application_error(
314+ virtual void session_connect_called(std::string const& app_name);
315+
316+ virtual void session_create_surface_called(std::string const& app_name);
317+
318+ virtual void session_next_buffer_called(std::string const& app_name);
319+
320+ virtual void session_release_surface_called(std::string const& app_name);
321+
322+ virtual void session_disconnect_called(std::string const& app_name);
323+
324+ virtual void session_drm_auth_magic_called(std::string const& app_name);
325+
326+ virtual void session_error(
327 std::string const& app_name,
328 char const* method,
329 std::string const& what);
330@@ -72,4 +72,4 @@
331 }
332
333
334-#endif /* MIR_FRONTEND_APPLICATION_MEDIATOR_REPORT_H_ */
335+#endif /* MIR_FRONTEND_SESSION_MEDIATOR_REPORT_H_ */
336
337=== renamed file 'include/server/mir/shell/session_store.h' => 'include/server/mir/frontend/shell.h'
338--- include/server/mir/shell/session_store.h 2013-03-07 08:04:05 +0000
339+++ include/server/mir/frontend/shell.h 2013-03-15 13:09:22 +0000
340@@ -16,23 +16,23 @@
341 * Authored by: Thomas Voss <thomas.voss@canonical.com>
342 */
343
344-#ifndef MIR_SHELL_SESSION_STORE_H_
345-#define MIR_SHELL_SESSION_STORE_H_
346+#ifndef MIR_FRONTEND_SHELL_H_
347+#define MIR_FRONTEND_SHELL_H_
348
349 #include <memory>
350
351 namespace mir
352 {
353
354-namespace shell
355+namespace frontend
356 {
357
358 class Session;
359
360-class SessionStore
361+class Shell
362 {
363 public:
364- virtual ~SessionStore() {}
365+ virtual ~Shell() {}
366
367 virtual std::shared_ptr<Session> open_session(std::string const& name) = 0;
368 virtual void close_session(std::shared_ptr<Session> const& session) = 0;
369@@ -43,12 +43,12 @@
370 virtual void shutdown() = 0;
371
372 protected:
373- SessionStore() = default;
374- SessionStore(const SessionStore&) = delete;
375- SessionStore& operator=(const SessionStore&) = delete;
376+ Shell() = default;
377+ Shell(const Shell&) = delete;
378+ Shell& operator=(const Shell&) = delete;
379 };
380
381 }
382 }
383
384-#endif // MIR_SHELL_SESSION_STORE_H_
385+#endif // MIR_FRONTEND_SHELL_H_
386
387=== renamed file 'include/server/mir/shell/surface.h' => 'include/server/mir/frontend/surface.h'
388--- include/server/mir/shell/surface.h 2013-03-07 08:04:05 +0000
389+++ include/server/mir/frontend/surface.h 2013-03-15 13:09:22 +0000
390@@ -17,8 +17,8 @@
391 */
392
393
394-#ifndef MIR_SHELL_SURFACE_H_
395-#define MIR_SHELL_SURFACE_H_
396+#ifndef MIR_FRONTEND_SURFACE_H_
397+#define MIR_FRONTEND_SURFACE_H_
398
399 #include "mir/geometry/pixel_format.h"
400 #include "mir/geometry/point.h"
401@@ -33,7 +33,7 @@
402 class Buffer;
403 }
404
405-namespace shell
406+namespace frontend
407 {
408
409 class Surface
410@@ -65,4 +65,4 @@
411 }
412
413
414-#endif /* MIR_SHELL_SURFACE_H_ */
415+#endif /* MIR_FRONTEND_SURFACE_H_ */
416
417=== renamed file 'include/server/mir/shell/surface_id.h' => 'include/server/mir/frontend/surface_id.h'
418--- include/server/mir/shell/surface_id.h 2013-03-07 08:04:05 +0000
419+++ include/server/mir/frontend/surface_id.h 2013-03-15 13:09:22 +0000
420@@ -16,17 +16,17 @@
421 * Authored By: Robert Carr <racarr@canonical.com>
422 */
423
424-#ifndef MIR_SHELL_SURFACE_ID_H_
425-#define MIR_SHELL_SURFACE_ID_H_
426+#ifndef MIR_FRONTEND_SURFACE_ID_H_
427+#define MIR_FRONTEND_SURFACE_ID_H_
428
429 #include "mir/int_wrapper.h"
430
431 namespace mir
432 {
433-namespace shell
434+namespace frontend
435 {
436 typedef IntWrapper<IntWrapperTypeTag::SessionsSurfaceId> SurfaceId;
437 }
438 } // namespace mir
439
440-#endif // MIR_SHELL_SURFACE_ID_H
441+#endif // MIR_FRONTEND_SURFACE_ID_H_
442
443=== renamed file 'include/server/mir/logging/application_mediator_report.h' => 'include/server/mir/logging/session_mediator_report.h'
444--- include/server/mir/logging/application_mediator_report.h 2013-03-04 16:02:02 +0000
445+++ include/server/mir/logging/session_mediator_report.h 2013-03-15 13:09:22 +0000
446@@ -17,10 +17,10 @@
447 */
448
449
450-#ifndef MIR_LOGGING_APPLICATION_MEDIATOR_REPORT_H_
451-#define MIR_LOGGING_APPLICATION_MEDIATOR_REPORT_H_
452+#ifndef MIR_LOGGING_SESSION_MEDIATOR_REPORT_H_
453+#define MIR_LOGGING_SESSION_MEDIATOR_REPORT_H_
454
455-#include "mir/frontend/application_mediator_report.h"
456+#include "mir/frontend/session_mediator_report.h"
457
458 #include <memory>
459
460@@ -30,24 +30,24 @@
461 {
462 class Logger;
463
464-class ApplicationMediatorReport : public frontend::ApplicationMediatorReport
465+class SessionMediatorReport : public frontend::SessionMediatorReport
466 {
467 public:
468- ApplicationMediatorReport(std::shared_ptr<Logger> const& log);
469-
470- virtual void application_connect_called(std::string const& app_name);
471-
472- virtual void application_create_surface_called(std::string const& app_name);
473-
474- virtual void application_next_buffer_called(std::string const& app_name);
475-
476- virtual void application_release_surface_called(std::string const& app_name);
477-
478- virtual void application_disconnect_called(std::string const& app_name);
479-
480- virtual void application_drm_auth_magic_called(std::string const& app_name);
481-
482- virtual void application_error(
483+ SessionMediatorReport(std::shared_ptr<Logger> const& log);
484+
485+ virtual void session_connect_called(std::string const& app_name);
486+
487+ virtual void session_create_surface_called(std::string const& app_name);
488+
489+ virtual void session_next_buffer_called(std::string const& app_name);
490+
491+ virtual void session_release_surface_called(std::string const& app_name);
492+
493+ virtual void session_disconnect_called(std::string const& app_name);
494+
495+ virtual void session_drm_auth_magic_called(std::string const& app_name);
496+
497+ virtual void session_error(
498 std::string const& app_name,
499 char const* method,
500 std::string const& what);
501@@ -60,4 +60,4 @@
502 }
503
504
505-#endif /* MIR_LOGGING_APPLICATION_MEDIATOR_REPORT_H_ */
506+#endif /* MIR_LOGGING_SESSION_MEDIATOR_REPORT_H_ */
507
508=== modified file 'include/server/mir/server_configuration.h'
509--- include/server/mir/server_configuration.h 2013-03-07 08:04:05 +0000
510+++ include/server/mir/server_configuration.h 2013-03-15 13:09:22 +0000
511@@ -29,11 +29,7 @@
512 namespace frontend
513 {
514 class Communicator;
515-}
516-
517-namespace shell
518-{
519-class SessionStore;
520+class Shell;
521 }
522 namespace graphics
523 {
524@@ -49,7 +45,7 @@
525 {
526 public:
527 virtual std::shared_ptr<frontend::Communicator> the_communicator() = 0;
528- virtual std::shared_ptr<shell::SessionStore> the_session_store() = 0;
529+ virtual std::shared_ptr<frontend::Shell> the_frontend_shell() = 0;
530 virtual std::shared_ptr<graphics::Display> the_display() = 0;
531 virtual std::shared_ptr<compositor::Drawer> the_drawer() = 0;
532 virtual std::shared_ptr<input::InputManager> the_input_manager() = 0;
533
534=== modified file 'include/server/mir/shell/application_session.h'
535--- include/server/mir/shell/application_session.h 2013-03-07 08:04:05 +0000
536+++ include/server/mir/shell/application_session.h 2013-03-15 13:09:22 +0000
537@@ -19,7 +19,7 @@
538 #ifndef MIR_SHELL_APPLICATION_SESSION_H_
539 #define MIR_SHELL_APPLICATION_SESSION_H_
540
541-#include "mir/shell/session.h"
542+#include "mir/frontend/session.h"
543
544 #include <map>
545
546@@ -30,15 +30,15 @@
547 {
548 class SurfaceFactory;
549
550-class ApplicationSession : public Session
551+class ApplicationSession : public frontend::Session
552 {
553 public:
554 explicit ApplicationSession(std::shared_ptr<SurfaceFactory> const& surface_factory, std::string const& session_name);
555 ~ApplicationSession();
556
557- SurfaceId create_surface(SurfaceCreationParameters const& params);
558- void destroy_surface(SurfaceId surface);
559- std::shared_ptr<Surface> get_surface(SurfaceId surface) const;
560+ frontend::SurfaceId create_surface(frontend::SurfaceCreationParameters const& params);
561+ void destroy_surface(frontend::SurfaceId surface);
562+ std::shared_ptr<frontend::Surface> get_surface(frontend::SurfaceId surface) const;
563
564 std::string name();
565 void shutdown();
566@@ -54,12 +54,12 @@
567 std::shared_ptr<SurfaceFactory> const surface_factory;
568 std::string const session_name;
569
570- SurfaceId next_id();
571+ frontend::SurfaceId next_id();
572
573 std::atomic<int> next_surface_id;
574
575- typedef std::map<SurfaceId, std::shared_ptr<Surface>> Surfaces;
576- Surfaces::const_iterator checked_find(SurfaceId id) const;
577+ typedef std::map<frontend::SurfaceId, std::shared_ptr<frontend::Surface>> Surfaces;
578+ Surfaces::const_iterator checked_find(frontend::SurfaceId id) const;
579 std::mutex mutable surfaces_mutex;
580 Surfaces surfaces;
581 };
582
583=== modified file 'include/server/mir/shell/consuming_placement_strategy.h'
584--- include/server/mir/shell/consuming_placement_strategy.h 2013-03-07 08:04:05 +0000
585+++ include/server/mir/shell/consuming_placement_strategy.h 2013-03-15 13:09:22 +0000
586@@ -38,7 +38,7 @@
587 explicit ConsumingPlacementStrategy(std::shared_ptr<graphics::ViewableArea> const& display_area);
588 virtual ~ConsumingPlacementStrategy() {}
589
590- virtual SurfaceCreationParameters place(SurfaceCreationParameters const& request_parameters);
591+ virtual frontend::SurfaceCreationParameters place(frontend::SurfaceCreationParameters const& request_parameters);
592
593 protected:
594 ConsumingPlacementStrategy(ConsumingPlacementStrategy const&) = delete;
595
596=== modified file 'include/server/mir/shell/focus_sequence.h'
597--- include/server/mir/shell/focus_sequence.h 2013-03-07 08:04:05 +0000
598+++ include/server/mir/shell/focus_sequence.h 2013-03-15 13:09:22 +0000
599@@ -23,18 +23,22 @@
600
601 namespace mir
602 {
603+namespace frontend
604+{
605+class Session;
606+}
607+
608 namespace shell
609 {
610-class Session;
611
612 class FocusSequence
613 {
614 public:
615 virtual ~FocusSequence() {}
616
617- virtual std::shared_ptr<Session> successor_of(std::shared_ptr<Session> const& focused_app) const = 0;
618- virtual std::shared_ptr<Session> predecessor_of(std::shared_ptr<Session> const& focused_app) const = 0;
619- virtual std::shared_ptr<Session> default_focus() const = 0;
620+ virtual std::shared_ptr<frontend::Session> successor_of(std::shared_ptr<frontend::Session> const& focused_app) const = 0;
621+ virtual std::shared_ptr<frontend::Session> predecessor_of(std::shared_ptr<frontend::Session> const& focused_app) const = 0;
622+ virtual std::shared_ptr<frontend::Session> default_focus() const = 0;
623
624 protected:
625 FocusSequence() = default;
626
627=== modified file 'include/server/mir/shell/focus_setter.h'
628--- include/server/mir/shell/focus_setter.h 2013-03-07 08:04:05 +0000
629+++ include/server/mir/shell/focus_setter.h 2013-03-15 13:09:22 +0000
630@@ -23,16 +23,20 @@
631
632 namespace mir
633 {
634+namespace frontend
635+{
636+class Session;
637+}
638+
639 namespace shell
640 {
641-class Session;
642
643 class FocusSetter
644 {
645 public:
646 virtual ~FocusSetter() {}
647
648- virtual void set_focus_to(std::shared_ptr<Session> const& new_focus) = 0;
649+ virtual void set_focus_to(std::shared_ptr<frontend::Session> const& new_focus) = 0;
650
651 protected:
652 FocusSetter() = default;
653
654=== modified file 'include/server/mir/shell/organising_surface_factory.h'
655--- include/server/mir/shell/organising_surface_factory.h 2013-03-07 08:04:05 +0000
656+++ include/server/mir/shell/organising_surface_factory.h 2013-03-15 13:09:22 +0000
657@@ -35,8 +35,8 @@
658 OrganisingSurfaceFactory(std::shared_ptr<SurfaceFactory> const& underlying_factory,
659 std::shared_ptr<PlacementStrategy> const& placement_strategy);
660 virtual ~OrganisingSurfaceFactory();
661-
662- std::shared_ptr<Surface> create_surface(SurfaceCreationParameters const& params);
663+
664+ std::shared_ptr<frontend::Surface> create_surface(frontend::SurfaceCreationParameters const& params);
665
666 protected:
667 OrganisingSurfaceFactory(OrganisingSurfaceFactory const&) = delete;
668
669=== modified file 'include/server/mir/shell/placement_strategy.h'
670--- include/server/mir/shell/placement_strategy.h 2013-03-07 08:04:05 +0000
671+++ include/server/mir/shell/placement_strategy.h 2013-03-15 13:09:22 +0000
672@@ -21,9 +21,13 @@
673
674 namespace mir
675 {
676+namespace frontend
677+{
678+struct SurfaceCreationParameters;
679+}
680+
681 namespace shell
682 {
683-class SurfaceCreationParameters;
684
685 class PlacementStrategy
686 {
687@@ -31,7 +35,7 @@
688 virtual ~PlacementStrategy() {}
689 // TODO: It is strange to work in terms of SurfaceCreationParameters here,
690 // perhaps a new interface is needed.
691- virtual SurfaceCreationParameters place(SurfaceCreationParameters const& request_parameters) = 0;
692+ virtual frontend::SurfaceCreationParameters place(frontend::SurfaceCreationParameters const& request_parameters) = 0;
693
694
695 protected:
696
697=== modified file 'include/server/mir/shell/registration_order_focus_sequence.h'
698--- include/server/mir/shell/registration_order_focus_sequence.h 2013-03-07 08:04:05 +0000
699+++ include/server/mir/shell/registration_order_focus_sequence.h 2013-03-15 13:09:22 +0000
700@@ -33,9 +33,9 @@
701 explicit RegistrationOrderFocusSequence(std::shared_ptr<SessionContainer> const& session_container);
702 virtual ~RegistrationOrderFocusSequence() {}
703
704- std::shared_ptr<Session> successor_of(std::shared_ptr<Session> const& focused_app) const;
705- std::shared_ptr<Session> predecessor_of(std::shared_ptr<Session> const& focused_app) const;
706- std::shared_ptr<Session> default_focus() const;
707+ std::shared_ptr<frontend::Session> successor_of(std::shared_ptr<frontend::Session> const& focused_app) const;
708+ std::shared_ptr<frontend::Session> predecessor_of(std::shared_ptr<frontend::Session> const& focused_app) const;
709+ std::shared_ptr<frontend::Session> default_focus() const;
710
711 protected:
712 RegistrationOrderFocusSequence(const RegistrationOrderFocusSequence&) = delete;
713
714=== modified file 'include/server/mir/shell/session_manager.h'
715--- include/server/mir/shell/session_manager.h 2013-03-07 08:04:05 +0000
716+++ include/server/mir/shell/session_manager.h 2013-03-15 13:09:22 +0000
717@@ -19,7 +19,7 @@
718 #ifndef MIR_SHELL_APPLICATION_MANAGER_H_
719 #define MIR_SHELL_APPLICATION_MANAGER_H_
720
721-#include "mir/shell/session_store.h"
722+#include "mir/frontend/shell.h"
723
724 #include <mutex>
725 #include <memory>
726@@ -28,15 +28,15 @@
727 namespace mir
728 {
729
730+/// Management of sessions and surfaces
731 namespace shell
732 {
733 class SurfaceFactory;
734-class Session;
735 class SessionContainer;
736 class FocusSequence;
737 class FocusSetter;
738
739-class SessionManager : public SessionStore
740+class SessionManager : public frontend::Shell
741 {
742 public:
743 explicit SessionManager(std::shared_ptr<SurfaceFactory> const& surface_factory,
744@@ -45,11 +45,11 @@
745 std::shared_ptr<FocusSetter> const& focus_setter);
746 virtual ~SessionManager();
747
748- virtual std::shared_ptr<Session> open_session(std::string const& name);
749- virtual void close_session(std::shared_ptr<Session> const& session);
750+ virtual std::shared_ptr<frontend::Session> open_session(std::string const& name);
751+ virtual void close_session(std::shared_ptr<frontend::Session> const& session);
752 virtual void shutdown();
753
754- virtual void tag_session_with_lightdm_id(std::shared_ptr<Session> const& session, int id);
755+ virtual void tag_session_with_lightdm_id(std::shared_ptr<frontend::Session> const& session, int id);
756 virtual void focus_session_with_lightdm_id(int id);
757
758 void focus_next();
759@@ -65,11 +65,11 @@
760 std::shared_ptr<FocusSetter> const focus_setter;
761
762 std::mutex mutex;
763- std::weak_ptr<Session> focus_application;
764- typedef std::vector<std::pair<int, std::shared_ptr<Session>>> Tags;
765+ std::weak_ptr<frontend::Session> focus_application;
766+ typedef std::vector<std::pair<int, std::shared_ptr<frontend::Session>>> Tags;
767 Tags tags;
768
769- void set_focus_to(std::shared_ptr<Session> const& next_focus);
770+ void set_focus_to(std::shared_ptr<frontend::Session> const& next_focus);
771 };
772
773 }
774
775=== modified file 'include/server/mir/shell/single_visibility_focus_mechanism.h'
776--- include/server/mir/shell/single_visibility_focus_mechanism.h 2013-03-07 08:04:05 +0000
777+++ include/server/mir/shell/single_visibility_focus_mechanism.h 2013-03-15 13:09:22 +0000
778@@ -24,10 +24,13 @@
779
780 namespace mir
781 {
782+namespace frontend
783+{
784+class Session;
785+}
786
787 namespace shell
788 {
789-class Session;
790 class SessionContainer;
791
792 class SingleVisibilityFocusMechanism : public FocusSetter
793@@ -36,7 +39,7 @@
794 explicit SingleVisibilityFocusMechanism(std::shared_ptr<SessionContainer> const& app_container);
795 virtual ~SingleVisibilityFocusMechanism() {}
796
797- void set_focus_to(std::shared_ptr<Session> const& new_focus);
798+ void set_focus_to(std::shared_ptr<frontend::Session> const& new_focus);
799
800 protected:
801 SingleVisibilityFocusMechanism(const SingleVisibilityFocusMechanism&) = delete;
802
803=== modified file 'include/server/mir/shell/surface_creation_parameters.h'
804--- include/server/mir/shell/surface_creation_parameters.h 2013-03-07 08:04:05 +0000
805+++ include/server/mir/shell/surface_creation_parameters.h 2013-03-15 13:09:22 +0000
806@@ -27,7 +27,7 @@
807
808 namespace mir
809 {
810-namespace shell
811+namespace frontend
812 {
813
814 struct SurfaceCreationParameters
815
816=== modified file 'include/server/mir/shell/surface_factory.h'
817--- include/server/mir/shell/surface_factory.h 2013-03-07 08:04:05 +0000
818+++ include/server/mir/shell/surface_factory.h 2013-03-15 13:09:22 +0000
819@@ -23,18 +23,20 @@
820
821 namespace mir
822 {
823+namespace frontend
824+{
825+struct SurfaceCreationParameters;
826+class Surface;
827+}
828
829 namespace shell
830 {
831-class SurfaceCreationParameters;
832-class Surface;
833-
834 class SurfaceFactory
835 {
836 public:
837 virtual ~SurfaceFactory() {}
838
839- virtual std::shared_ptr<Surface> create_surface(const SurfaceCreationParameters& params) = 0;
840+ virtual std::shared_ptr<frontend::Surface> create_surface(const frontend::SurfaceCreationParameters& params) = 0;
841
842 protected:
843 SurfaceFactory() = default;
844
845=== modified file 'include/server/mir/surfaces/surface_controller.h'
846--- include/server/mir/surfaces/surface_controller.h 2013-03-07 08:04:05 +0000
847+++ include/server/mir/surfaces/surface_controller.h 2013-03-15 13:09:22 +0000
848@@ -30,8 +30,6 @@
849 /// classes) and controller (SurfaceController) elements of an MVC design.
850 namespace surfaces
851 {
852-
853-class Surface;
854 class SurfaceStackModel;
855
856 class SurfaceController : public shell::SurfaceFactory
857@@ -40,7 +38,7 @@
858 explicit SurfaceController(std::shared_ptr<SurfaceStackModel> const& surface_stack);
859 virtual ~SurfaceController() {}
860
861- std::shared_ptr<shell::Surface> create_surface(const shell::SurfaceCreationParameters& params);
862+ std::shared_ptr<frontend::Surface> create_surface(const frontend::SurfaceCreationParameters& params);
863
864 protected:
865 SurfaceController(const SurfaceController&) = delete;
866
867=== modified file 'include/server/mir/surfaces/surface_stack.h'
868--- include/server/mir/surfaces/surface_stack.h 2013-03-07 08:04:05 +0000
869+++ include/server/mir/surfaces/surface_stack.h 2013-03-15 13:09:22 +0000
870@@ -35,7 +35,7 @@
871 class OperatorForRenderables;
872 }
873
874-namespace shell
875+namespace frontend
876 {
877 class SurfaceCreationParameters;
878 }
879@@ -55,7 +55,7 @@
880 virtual void for_each_if(compositor::FilterForRenderables &filter, compositor::OperatorForRenderables &renderable_operator);
881
882 // From SurfaceStackModel
883- virtual std::weak_ptr<Surface> create_surface(const shell::SurfaceCreationParameters& params);
884+ virtual std::weak_ptr<Surface> create_surface(const frontend::SurfaceCreationParameters& params);
885
886 virtual void destroy_surface(std::weak_ptr<Surface> const& surface);
887
888
889=== modified file 'include/server/mir/surfaces/surface_stack_model.h'
890--- include/server/mir/surfaces/surface_stack_model.h 2013-03-07 08:04:05 +0000
891+++ include/server/mir/surfaces/surface_stack_model.h 2013-03-15 13:09:22 +0000
892@@ -23,7 +23,7 @@
893
894 namespace mir
895 {
896-namespace shell
897+namespace frontend
898 {
899 class SurfaceCreationParameters;
900 }
901@@ -38,7 +38,7 @@
902 public:
903 virtual ~SurfaceStackModel() {}
904
905- virtual std::weak_ptr<Surface> create_surface(const shell::SurfaceCreationParameters& params) = 0;
906+ virtual std::weak_ptr<Surface> create_surface(const frontend::SurfaceCreationParameters& params) = 0;
907
908 virtual void destroy_surface(std::weak_ptr<Surface> const& surface) = 0;
909
910
911=== modified file 'include/test/mir_test_cucumber/session_management_context.h'
912--- include/test/mir_test_cucumber/session_management_context.h 2013-03-07 08:04:05 +0000
913+++ include/test/mir_test_cucumber/session_management_context.h 2013-03-15 13:09:22 +0000
914@@ -21,7 +21,7 @@
915
916 #include "mir/server_configuration.h"
917 #include "mir/geometry/rectangle.h"
918-#include "mir/shell/surface_id.h"
919+#include "mir/frontend/surface_id.h"
920
921 #include <string>
922 #include <map>
923@@ -32,9 +32,9 @@
924 {
925 class ServerConfiguration;
926
927-namespace shell
928+namespace frontend
929 {
930-class SessionStore;
931+class Shell;
932 class Session;
933 }
934 namespace graphics
935@@ -68,10 +68,10 @@
936 SessionManagementContext& operator=(SessionManagementContext const&) = delete;
937
938 private:
939- std::map<std::string, std::tuple<std::shared_ptr<shell::Session>, shell::SurfaceId>> open_windows;
940+ std::map<std::string, std::tuple<std::shared_ptr<frontend::Session>, frontend::SurfaceId>> open_windows;
941
942 std::shared_ptr<SizedDisplay> view_area;
943- std::shared_ptr<shell::SessionStore> session_store;
944+ std::shared_ptr<frontend::Shell> shell;
945 };
946
947 }
948
949=== modified file 'include/test/mir_test_doubles/mock_session.h'
950--- include/test/mir_test_doubles/mock_session.h 2013-03-11 20:18:11 +0000
951+++ include/test/mir_test_doubles/mock_session.h 2013-03-15 13:09:22 +0000
952@@ -19,7 +19,7 @@
953 #ifndef MIR_TEST_DOUBLES_MOCK_SESSION_H_
954 #define MIR_TEST_DOUBLES_MOCK_SESSION_H_
955
956-#include "mir/shell/session.h"
957+#include "mir/frontend/session.h"
958
959 #include <gmock/gmock.h>
960
961@@ -30,11 +30,11 @@
962 namespace doubles
963 {
964
965-struct MockSession : public shell::Session
966+struct MockSession : public frontend::Session
967 {
968- MOCK_METHOD1(create_surface, shell::SurfaceId(shell::SurfaceCreationParameters const&));
969- MOCK_METHOD1(destroy_surface, void(shell::SurfaceId));
970- MOCK_CONST_METHOD1(get_surface, std::shared_ptr<shell::Surface>(shell::SurfaceId));
971+ MOCK_METHOD1(create_surface, frontend::SurfaceId(frontend::SurfaceCreationParameters const&));
972+ MOCK_METHOD1(destroy_surface, void(frontend::SurfaceId));
973+ MOCK_CONST_METHOD1(get_surface, std::shared_ptr<frontend::Surface>(frontend::SurfaceId));
974
975 MOCK_METHOD0(name, std::string());
976 MOCK_METHOD0(shutdown, void());
977
978=== renamed file 'include/test/mir_test_doubles/mock_session_store.h' => 'include/test/mir_test_doubles/mock_shell.h'
979--- include/test/mir_test_doubles/mock_session_store.h 2013-03-07 23:14:15 +0000
980+++ include/test/mir_test_doubles/mock_shell.h 2013-03-15 13:09:22 +0000
981@@ -16,10 +16,10 @@
982 * Authored by: Robert Carr <robert.carr@canonical.com>
983 */
984
985-#ifndef MIR_TEST_DOUBLES_MOCK_SESSION_STORE_H_
986-#define MIR_TEST_DOUBLES_MOCK_SESSION_STORE_H_
987+#ifndef MIR_TEST_DOUBLES_SHELL_H_
988+#define MIR_TEST_DOUBLES_SHELL_H_
989
990-#include "mir/shell/session_store.h"
991+#include "mir/frontend/shell.h"
992
993 #include <gmock/gmock.h>
994
995@@ -30,12 +30,12 @@
996 namespace doubles
997 {
998
999-struct MockSessionStore : public shell::SessionStore
1000+struct MockShell : public frontend::Shell
1001 {
1002- MOCK_METHOD1(open_session, std::shared_ptr<shell::Session>(std::string const&));
1003- MOCK_METHOD1(close_session, void(std::shared_ptr<shell::Session> const&));
1004+ MOCK_METHOD1(open_session, std::shared_ptr<frontend::Session>(std::string const&));
1005+ MOCK_METHOD1(close_session, void(std::shared_ptr<frontend::Session> const&));
1006
1007- MOCK_METHOD2(tag_session_with_lightdm_id, void(std::shared_ptr<shell::Session> const&, int));
1008+ MOCK_METHOD2(tag_session_with_lightdm_id, void(std::shared_ptr<frontend::Session> const&, int));
1009 MOCK_METHOD1(focus_session_with_lightdm_id, void(int));
1010
1011 MOCK_METHOD0(shutdown, void());
1012@@ -45,4 +45,4 @@
1013 }
1014 } // namespace mir
1015
1016-#endif // MIR_TEST_DOUBLES_MOCK_SESSION_STORE_H_
1017+#endif // MIR_TEST_DOUBLES_SHELL_H_
1018
1019=== modified file 'include/test/mir_test_doubles/mock_surface.h'
1020--- include/test/mir_test_doubles/mock_surface.h 2013-03-11 20:18:11 +0000
1021+++ include/test/mir_test_doubles/mock_surface.h 2013-03-15 13:09:22 +0000
1022@@ -19,7 +19,7 @@
1023 #ifndef MIR_TEST_DOUBLES_MOCK_SURFACE_H_
1024 #define MIR_TEST_DOUBLES_MOCK_SURFACE_H_
1025
1026-#include "mir/shell/surface.h"
1027+#include "mir/frontend/surface.h"
1028
1029 #include <memory>
1030
1031@@ -30,7 +30,7 @@
1032 namespace doubles
1033 {
1034
1035-struct MockSurface : public shell::Surface
1036+struct MockSurface : public frontend::Surface
1037 {
1038 MOCK_METHOD0(hide, void());
1039 MOCK_METHOD0(show, void());
1040
1041=== modified file 'include/test/mir_test_doubles/mock_surface_factory.h'
1042--- include/test/mir_test_doubles/mock_surface_factory.h 2013-03-07 08:04:05 +0000
1043+++ include/test/mir_test_doubles/mock_surface_factory.h 2013-03-15 13:09:22 +0000
1044@@ -33,7 +33,7 @@
1045
1046 struct MockSurfaceFactory : public shell::SurfaceFactory
1047 {
1048- MOCK_METHOD1(create_surface, std::shared_ptr<shell::Surface>(const shell::SurfaceCreationParameters&));
1049+ MOCK_METHOD1(create_surface, std::shared_ptr<frontend::Surface>(const frontend::SurfaceCreationParameters&));
1050 };
1051
1052 }
1053
1054=== modified file 'include/test/mir_test_doubles/stub_session.h'
1055--- include/test/mir_test_doubles/stub_session.h 2013-03-11 20:12:42 +0000
1056+++ include/test/mir_test_doubles/stub_session.h 2013-03-15 13:09:22 +0000
1057@@ -19,7 +19,7 @@
1058 #ifndef MIR_TEST_DOUBLES_STUB_SESSION_H_
1059 #define MIR_TEST_DOUBLES_STUB_SESSION_H_
1060
1061-#include "mir/shell/session.h"
1062+#include "mir/frontend/session.h"
1063
1064 namespace mir
1065 {
1066@@ -28,18 +28,18 @@
1067 namespace doubles
1068 {
1069
1070-struct StubSession : public shell::Session
1071+struct StubSession : public frontend::Session
1072 {
1073- shell::SurfaceId create_surface(shell::SurfaceCreationParameters const& /* params */)
1074- {
1075- return shell::SurfaceId{0};
1076- }
1077- void destroy_surface(shell::SurfaceId /* surface */)
1078- {
1079- }
1080- std::shared_ptr<shell::Surface> get_surface(shell::SurfaceId /* surface */) const
1081- {
1082- return std::shared_ptr<shell::Surface>();
1083+ frontend::SurfaceId create_surface(frontend::SurfaceCreationParameters const& /* params */)
1084+ {
1085+ return frontend::SurfaceId{0};
1086+ }
1087+ void destroy_surface(frontend::SurfaceId /* surface */)
1088+ {
1089+ }
1090+ std::shared_ptr<frontend::Surface> get_surface(frontend::SurfaceId /* surface */) const
1091+ {
1092+ return std::shared_ptr<frontend::Surface>();
1093 }
1094 std::string name()
1095 {
1096
1097=== renamed file 'include/test/mir_test_doubles/stub_session_store.h' => 'include/test/mir_test_doubles/stub_shell.h'
1098--- include/test/mir_test_doubles/stub_session_store.h 2013-03-11 20:12:42 +0000
1099+++ include/test/mir_test_doubles/stub_shell.h 2013-03-15 13:09:22 +0000
1100@@ -16,10 +16,10 @@
1101 * Authored by: Robert Carr <robert.carr@canonical.com>
1102 */
1103
1104-#ifndef MIR_TEST_DOUBLES_STUB_SESSION_STORE_H_
1105-#define MIR_TEST_DOUBLES_STUB_SESSION_STORE_H_
1106+#ifndef MIR_TEST_DOUBLES_STUB_SHELL_H_
1107+#define MIR_TEST_DOUBLES_STUB_SHELL_H_
1108
1109-#include "mir/shell/session_store.h"
1110+#include "mir/frontend/shell.h"
1111 #include "mir_test_doubles/stub_session.h"
1112
1113 namespace mir
1114@@ -29,16 +29,16 @@
1115 namespace doubles
1116 {
1117
1118-class StubSessionStore : public shell::SessionStore
1119+class StubShell : public frontend::Shell
1120 {
1121- std::shared_ptr<shell::Session> open_session(std::string const& /* name */)
1122+ std::shared_ptr<frontend::Session> open_session(std::string const& /* name */)
1123 {
1124 return std::make_shared<StubSession>();
1125 }
1126- void close_session(std::shared_ptr<shell::Session> const& /* session */)
1127+ void close_session(std::shared_ptr<frontend::Session> const& /* session */)
1128 {
1129 }
1130- void tag_session_with_lightdm_id(std::shared_ptr<shell::Session> const& /* session */, int /* id */)
1131+ void tag_session_with_lightdm_id(std::shared_ptr<frontend::Session> const& /* session */, int /* id */)
1132 {
1133 }
1134 void focus_session_with_lightdm_id(int /* id */)
1135@@ -53,4 +53,4 @@
1136 }
1137 } // namespace mir
1138
1139-#endif // MIR_TEST_DOUBLES_STUB_SESSION_STORE_H_
1140+#endif // MIR_TEST_DOUBLES_STUB_SHELL_H_
1141
1142=== modified file 'src/server/default_server_configuration.cpp'
1143--- src/server/default_server_configuration.cpp 2013-03-13 07:41:46 +0000
1144+++ src/server/default_server_configuration.cpp 2013-03-15 13:09:22 +0000
1145@@ -25,13 +25,13 @@
1146 #include "mir/compositor/compositor.h"
1147 #include "mir/compositor/swapper_factory.h"
1148 #include "mir/frontend/protobuf_ipc_factory.h"
1149-#include "mir/frontend/application_mediator_report.h"
1150-#include "mir/frontend/application_mediator.h"
1151+#include "mir/frontend/session_mediator_report.h"
1152+#include "mir/frontend/session_mediator.h"
1153 #include "mir/frontend/resource_cache.h"
1154 #include "mir/shell/session_manager.h"
1155 #include "mir/shell/registration_order_focus_sequence.h"
1156 #include "mir/shell/single_visibility_focus_mechanism.h"
1157-#include "mir/shell/session_container.h"
1158+#include "mir/frontend/session_container.h"
1159 #include "mir/shell/consuming_placement_strategy.h"
1160 #include "mir/shell/organising_surface_factory.h"
1161 #include "mir/graphics/display.h"
1162@@ -43,7 +43,7 @@
1163 #include "mir/input/input_manager.h"
1164 #include "mir/logging/logger.h"
1165 #include "mir/logging/dumb_console_logger.h"
1166-#include "mir/logging/application_mediator_report.h"
1167+#include "mir/logging/session_mediator_report.h"
1168 #include "mir/logging/display_report.h"
1169 #include "mir/surfaces/surface_controller.h"
1170 #include "mir/surfaces/surface_stack.h"
1171@@ -68,12 +68,12 @@
1172 {
1173 public:
1174 explicit DefaultIpcFactory(
1175- std::shared_ptr<msh::SessionStore> const& session_store,
1176- std::shared_ptr<mf::ApplicationMediatorReport> const& report,
1177+ std::shared_ptr<mf::Shell> const& shell,
1178+ std::shared_ptr<mf::SessionMediatorReport> const& report,
1179 std::shared_ptr<mg::Platform> const& graphics_platform,
1180 std::shared_ptr<mg::ViewableArea> const& graphics_display,
1181 std::shared_ptr<mc::GraphicBufferAllocator> const& buffer_allocator) :
1182- session_store(session_store),
1183+ shell(shell),
1184 report(report),
1185 cache(std::make_shared<mf::ResourceCache>()),
1186 graphics_platform(graphics_platform),
1187@@ -83,8 +83,8 @@
1188 }
1189
1190 private:
1191- std::shared_ptr<msh::SessionStore> session_store;
1192- std::shared_ptr<mf::ApplicationMediatorReport> const report;
1193+ std::shared_ptr<mf::Shell> shell;
1194+ std::shared_ptr<mf::SessionMediatorReport> const report;
1195 std::shared_ptr<mf::ResourceCache> const cache;
1196 std::shared_ptr<mg::Platform> const graphics_platform;
1197 std::shared_ptr<mg::ViewableArea> const graphics_display;
1198@@ -92,8 +92,8 @@
1199
1200 virtual std::shared_ptr<mir::protobuf::DisplayServer> make_ipc_server()
1201 {
1202- return std::make_shared<mf::ApplicationMediator>(
1203- session_store,
1204+ return std::make_shared<mf::SessionMediator>(
1205+ shell,
1206 graphics_platform,
1207 graphics_display,
1208 buffer_allocator,
1209@@ -245,11 +245,11 @@
1210 });
1211 }
1212
1213-std::shared_ptr<msh::SessionStore>
1214-mir::DefaultServerConfiguration::the_session_store()
1215+std::shared_ptr<mf::Shell>
1216+mir::DefaultServerConfiguration::the_frontend_shell()
1217 {
1218- return session_store(
1219- [this]() -> std::shared_ptr<msh::SessionStore>
1220+ return session_manager(
1221+ [this]() -> std::shared_ptr<msh::SessionManager>
1222 {
1223 auto session_container = std::make_shared<msh::SessionContainer>();
1224 auto focus_mechanism = std::make_shared<msh::SingleVisibilityFocusMechanism>(session_container);
1225@@ -356,7 +356,7 @@
1226
1227 std::shared_ptr<mir::frontend::ProtobufIpcFactory>
1228 mir::DefaultServerConfiguration::the_ipc_factory(
1229- std::shared_ptr<msh::SessionStore> const& session_store,
1230+ std::shared_ptr<mf::Shell> const& shell,
1231 std::shared_ptr<mg::ViewableArea> const& display,
1232 std::shared_ptr<mc::GraphicBufferAllocator> const& allocator)
1233 {
1234@@ -364,26 +364,26 @@
1235 [&]()
1236 {
1237 return std::make_shared<DefaultIpcFactory>(
1238- session_store,
1239- the_application_mediator_report(),
1240+ shell,
1241+ the_session_mediator_report(),
1242 the_graphics_platform(),
1243 display, allocator);
1244 });
1245 }
1246
1247-std::shared_ptr<mf::ApplicationMediatorReport>
1248-mir::DefaultServerConfiguration::the_application_mediator_report()
1249+std::shared_ptr<mf::SessionMediatorReport>
1250+mir::DefaultServerConfiguration::the_session_mediator_report()
1251 {
1252- return application_mediator_report(
1253- [this]() -> std::shared_ptr<mf::ApplicationMediatorReport>
1254+ return session_mediator_report(
1255+ [this]() -> std::shared_ptr<mf::SessionMediatorReport>
1256 {
1257 if (the_options()->get(log_app_mediator, false))
1258 {
1259- return std::make_shared<ml::ApplicationMediatorReport>(the_logger());
1260+ return std::make_shared<ml::SessionMediatorReport>(the_logger());
1261 }
1262 else
1263 {
1264- return std::make_shared<mf::NullApplicationMediatorReport>();
1265+ return std::make_shared<mf::NullSessionMediatorReport>();
1266 }
1267 });
1268 }
1269
1270=== modified file 'src/server/display_server.cpp'
1271--- src/server/display_server.cpp 2013-03-13 07:41:46 +0000
1272+++ src/server/display_server.cpp 2013-03-15 13:09:22 +0000
1273@@ -22,7 +22,7 @@
1274 #include "mir/server_configuration.h"
1275
1276 #include "mir/compositor/drawer.h"
1277-#include "mir/shell/session_store.h"
1278+#include "mir/frontend/shell.h"
1279 #include "mir/frontend/communicator.h"
1280 #include "mir/graphics/display.h"
1281 #include "mir/input/input_manager.h"
1282@@ -40,7 +40,7 @@
1283 Private(ServerConfiguration& config)
1284 : display{config.the_display()},
1285 compositor{config.the_drawer()},
1286- session_store{config.the_session_store()},
1287+ shell{config.the_frontend_shell()},
1288 communicator{config.the_communicator()},
1289 input_manager{config.the_input_manager()},
1290 exit(false)
1291@@ -49,7 +49,7 @@
1292
1293 std::shared_ptr<mg::Display> display;
1294 std::shared_ptr<mc::Drawer> compositor;
1295- std::shared_ptr<shell::SessionStore> session_store;
1296+ std::shared_ptr<frontend::Shell> shell;
1297 std::shared_ptr<mf::Communicator> communicator;
1298 std::shared_ptr<mi::InputManager> input_manager;
1299 std::mutex exit_guard;
1300@@ -64,7 +64,7 @@
1301
1302 mir::DisplayServer::~DisplayServer()
1303 {
1304- p->session_store->shutdown();
1305+ p->shell->shutdown();
1306 }
1307
1308 void mir::DisplayServer::run()
1309
1310=== modified file 'src/server/frontend/CMakeLists.txt'
1311--- src/server/frontend/CMakeLists.txt 2013-03-07 08:04:05 +0000
1312+++ src/server/frontend/CMakeLists.txt 2013-03-15 13:09:22 +0000
1313@@ -1,10 +1,11 @@
1314 set(
1315 FRONTEND_SOURCES
1316
1317- application_mediator.cpp
1318- null_application_mediator_report.cpp
1319+ session_mediator.cpp
1320+ null_session_mediator_report.cpp
1321 protobuf_message_processor.cpp
1322 null_message_processor.cpp
1323+ surface_creation_parameters.cpp
1324
1325 resource_cache.cpp
1326 ${PROTO_HDRS}
1327@@ -25,10 +26,10 @@
1328 endif()
1329
1330 if (MIR_PLATFORM STREQUAL "android")
1331- list(APPEND FRONTEND_SOURCES application_mediator_android.cpp)
1332+ list(APPEND FRONTEND_SOURCES session_mediator_android.cpp)
1333 elseif (MIR_PLATFORM STREQUAL "gbm")
1334 include_directories(${DRM_INCLUDE_DIRS})
1335- list(APPEND FRONTEND_SOURCES application_mediator_gbm.cpp)
1336+ list(APPEND FRONTEND_SOURCES session_mediator_gbm.cpp)
1337 endif()
1338
1339 # TODO replace this frig with an RTTI enabled binder library
1340
1341=== modified file 'src/server/frontend/make_protobuf_binder_communicator.cpp'
1342--- src/server/frontend/make_protobuf_binder_communicator.cpp 2013-03-07 08:04:05 +0000
1343+++ src/server/frontend/make_protobuf_binder_communicator.cpp 2013-03-15 13:09:22 +0000
1344@@ -32,7 +32,7 @@
1345 auto const threads = the_options()->get("ipc-thread-pool", 10);
1346 return std::make_shared<mf::ProtobufBinderCommunicator>(
1347 the_socket_file(),
1348- the_ipc_factory(the_session_store(), the_viewable_area(), the_buffer_allocator()));
1349+ the_ipc_factory(the_frontend_shell(), the_viewable_area(), the_buffer_allocator()));
1350 });
1351
1352 }
1353
1354=== modified file 'src/server/frontend/make_protobuf_socket_communicator.cpp'
1355--- src/server/frontend/make_protobuf_socket_communicator.cpp 2013-03-07 08:04:05 +0000
1356+++ src/server/frontend/make_protobuf_socket_communicator.cpp 2013-03-15 13:09:22 +0000
1357@@ -33,7 +33,7 @@
1358 auto const threads = the_options()->get("ipc-thread-pool", 10);
1359 return std::make_shared<mf::ProtobufSocketCommunicator>(
1360 the_socket_file(),
1361- the_ipc_factory(the_session_store(), the_viewable_area(), the_buffer_allocator()),
1362+ the_ipc_factory(the_frontend_shell(), the_viewable_area(), the_buffer_allocator()),
1363 threads);
1364 });
1365 }
1366
1367=== renamed file 'src/server/frontend/null_application_mediator_report.cpp' => 'src/server/frontend/null_session_mediator_report.cpp'
1368--- src/server/frontend/null_application_mediator_report.cpp 2013-03-07 08:04:05 +0000
1369+++ src/server/frontend/null_session_mediator_report.cpp 2013-03-15 13:09:22 +0000
1370@@ -16,33 +16,33 @@
1371 * Authored by: Alan Griffiths <alan@octopull.co.uk>
1372 */
1373
1374-#include "mir/frontend/application_mediator_report.h"
1375-
1376-void mir::frontend::NullApplicationMediatorReport::application_connect_called(std::string const&)
1377-{
1378-}
1379-
1380-void mir::frontend::NullApplicationMediatorReport::application_create_surface_called(std::string const&)
1381-{
1382-}
1383-
1384-void mir::frontend::NullApplicationMediatorReport::application_next_buffer_called(std::string const&)
1385-{
1386-}
1387-
1388-void mir::frontend::NullApplicationMediatorReport::application_release_surface_called(std::string const&)
1389-{
1390-}
1391-
1392-void mir::frontend::NullApplicationMediatorReport::application_disconnect_called(std::string const&)
1393-{
1394-}
1395-
1396-void mir::frontend::NullApplicationMediatorReport::application_drm_auth_magic_called(std::string const&)
1397-{
1398-}
1399-
1400-void mir::frontend::NullApplicationMediatorReport::application_error(
1401+#include "mir/frontend/session_mediator_report.h"
1402+
1403+void mir::frontend::NullSessionMediatorReport::session_connect_called(std::string const&)
1404+{
1405+}
1406+
1407+void mir::frontend::NullSessionMediatorReport::session_create_surface_called(std::string const&)
1408+{
1409+}
1410+
1411+void mir::frontend::NullSessionMediatorReport::session_next_buffer_called(std::string const&)
1412+{
1413+}
1414+
1415+void mir::frontend::NullSessionMediatorReport::session_release_surface_called(std::string const&)
1416+{
1417+}
1418+
1419+void mir::frontend::NullSessionMediatorReport::session_disconnect_called(std::string const&)
1420+{
1421+}
1422+
1423+void mir::frontend::NullSessionMediatorReport::session_drm_auth_magic_called(std::string const&)
1424+{
1425+}
1426+
1427+void mir::frontend::NullSessionMediatorReport::session_error(
1428 std::string const&,
1429 char const* ,
1430 std::string const& )
1431
1432=== renamed file 'src/server/frontend/application_mediator.cpp' => 'src/server/frontend/session_mediator.cpp'
1433--- src/server/frontend/application_mediator.cpp 2013-03-07 08:04:05 +0000
1434+++ src/server/frontend/session_mediator.cpp 2013-03-15 13:09:22 +0000
1435@@ -16,11 +16,11 @@
1436 * Authored by: Alan Griffiths <alan@octopull.co.uk>
1437 */
1438
1439-#include "mir/frontend/application_mediator.h"
1440-#include "mir/frontend/application_mediator_report.h"
1441-#include "mir/shell/session_store.h"
1442-#include "mir/shell/session.h"
1443-#include "mir/shell/surface.h"
1444+#include "mir/frontend/session_mediator.h"
1445+#include "mir/frontend/session_mediator_report.h"
1446+#include "mir/frontend/shell.h"
1447+#include "mir/frontend/session.h"
1448+#include "mir/frontend/surface.h"
1449 #include "mir/shell/surface_creation_parameters.h"
1450 #include "mir/frontend/resource_cache.h"
1451
1452@@ -35,14 +35,14 @@
1453 #include "mir/graphics/platform_ipc_package.h"
1454 #include <boost/throw_exception.hpp>
1455
1456-mir::frontend::ApplicationMediator::ApplicationMediator(
1457- std::shared_ptr<shell::SessionStore> const& session_store,
1458+mir::frontend::SessionMediator::SessionMediator(
1459+ std::shared_ptr<frontend::Shell> const& shell,
1460 std::shared_ptr<graphics::Platform> const & graphics_platform,
1461 std::shared_ptr<graphics::ViewableArea> const& viewable_area,
1462 std::shared_ptr<compositor::GraphicBufferAllocator> const& buffer_allocator,
1463- std::shared_ptr<ApplicationMediatorReport> const& report,
1464+ std::shared_ptr<SessionMediatorReport> const& report,
1465 std::shared_ptr<ResourceCache> const& resource_cache) :
1466- session_store(session_store),
1467+ shell(shell),
1468 graphics_platform(graphics_platform),
1469 viewable_area(viewable_area),
1470 buffer_allocator(buffer_allocator),
1471@@ -51,15 +51,15 @@
1472 {
1473 }
1474
1475-void mir::frontend::ApplicationMediator::connect(
1476+void mir::frontend::SessionMediator::connect(
1477 ::google::protobuf::RpcController*,
1478 const ::mir::protobuf::ConnectParameters* request,
1479 ::mir::protobuf::Connection* response,
1480 ::google::protobuf::Closure* done)
1481 {
1482- report->application_connect_called(request->application_name());
1483+ report->session_connect_called(request->application_name());
1484
1485- application_session = session_store->open_session(request->application_name());
1486+ session = shell->open_session(request->application_name());
1487
1488 auto ipc_package = graphics_platform->get_ipc_package();
1489 auto platform = response->mutable_platform();
1490@@ -82,24 +82,24 @@
1491 resource_cache->save_resource(response, ipc_package);
1492
1493 if (request->has_lightdm_id())
1494- session_store->tag_session_with_lightdm_id(application_session, request->lightdm_id());
1495+ shell->tag_session_with_lightdm_id(session, request->lightdm_id());
1496
1497 done->Run();
1498 }
1499
1500-void mir::frontend::ApplicationMediator::create_surface(
1501+void mir::frontend::SessionMediator::create_surface(
1502 google::protobuf::RpcController* /*controller*/,
1503 const mir::protobuf::SurfaceParameters* request,
1504 mir::protobuf::Surface* response,
1505 google::protobuf::Closure* done)
1506 {
1507- if (application_session.get() == nullptr)
1508+ if (session.get() == nullptr)
1509 BOOST_THROW_EXCEPTION(std::logic_error("Invalid application session"));
1510
1511- report->application_create_surface_called(application_session->name());
1512+ report->session_create_surface_called(session->name());
1513
1514- auto const id = application_session->create_surface(
1515- shell::SurfaceCreationParameters()
1516+ auto const id = session->create_surface(
1517+ SurfaceCreationParameters()
1518 .of_name(request->surface_name())
1519 .of_size(request->width(), request->height())
1520 .of_buffer_usage(static_cast<compositor::BufferUsage>(request->buffer_usage()))
1521@@ -107,7 +107,7 @@
1522 );
1523
1524 {
1525- auto surface = application_session->get_surface(id);
1526+ auto surface = session->get_surface(id);
1527 response->mutable_id()->set_value(id.as_value());
1528 response->set_width(surface->size().width.as_uint32_t());
1529 response->set_height(surface->size().height.as_uint32_t());
1530@@ -138,20 +138,18 @@
1531 done->Run();
1532 }
1533
1534-void mir::frontend::ApplicationMediator::next_buffer(
1535+void mir::frontend::SessionMediator::next_buffer(
1536 ::google::protobuf::RpcController* /*controller*/,
1537 ::mir::protobuf::SurfaceId const* request,
1538 ::mir::protobuf::Buffer* response,
1539 ::google::protobuf::Closure* done)
1540 {
1541- using shell::SurfaceId;
1542-
1543- if (application_session.get() == nullptr)
1544+ if (session.get() == nullptr)
1545 BOOST_THROW_EXCEPTION(std::logic_error("Invalid application session"));
1546
1547- report->application_next_buffer_called(application_session->name());
1548+ report->session_next_buffer_called(session->name());
1549
1550- auto surface = application_session->get_surface(SurfaceId(request->value()));
1551+ auto surface = session->get_surface(SurfaceId(request->value()));
1552
1553 surface->advance_client_buffer();
1554 auto const& buffer_resource = surface->client_buffer();
1555@@ -171,51 +169,51 @@
1556 done->Run();
1557 }
1558
1559-void mir::frontend::ApplicationMediator::select_focus_by_lightdm_id(
1560+void mir::frontend::SessionMediator::select_focus_by_lightdm_id(
1561 google::protobuf::RpcController*,// controller,
1562 mir::protobuf::LightdmId const* request,
1563 mir::protobuf::Void*,// response,
1564 google::protobuf::Closure* done)
1565 {
1566- if (application_session.get() == nullptr)
1567+ if (session.get() == nullptr)
1568 BOOST_THROW_EXCEPTION(std::logic_error("Invalid application session"));
1569
1570- session_store->focus_session_with_lightdm_id(request->value());
1571+ shell->focus_session_with_lightdm_id(request->value());
1572
1573 done->Run();
1574 }
1575
1576-void mir::frontend::ApplicationMediator::release_surface(
1577+void mir::frontend::SessionMediator::release_surface(
1578 google::protobuf::RpcController* /*controller*/,
1579 const mir::protobuf::SurfaceId* request,
1580 mir::protobuf::Void*,
1581 google::protobuf::Closure* done)
1582 {
1583- if (application_session.get() == nullptr)
1584+ if (session.get() == nullptr)
1585 BOOST_THROW_EXCEPTION(std::logic_error("Invalid application session"));
1586
1587- report->application_release_surface_called(application_session->name());
1588-
1589- auto const id = shell::SurfaceId(request->value());
1590-
1591- application_session->destroy_surface(id);
1592+ report->session_release_surface_called(session->name());
1593+
1594+ auto const id = SurfaceId(request->value());
1595+
1596+ session->destroy_surface(id);
1597
1598 done->Run();
1599 }
1600
1601-void mir::frontend::ApplicationMediator::disconnect(
1602+void mir::frontend::SessionMediator::disconnect(
1603 google::protobuf::RpcController* /*controller*/,
1604 const mir::protobuf::Void* /*request*/,
1605 mir::protobuf::Void* /*response*/,
1606 google::protobuf::Closure* done)
1607 {
1608- if (application_session.get() == nullptr)
1609+ if (session.get() == nullptr)
1610 BOOST_THROW_EXCEPTION(std::logic_error("Invalid application session"));
1611
1612- report->application_disconnect_called(application_session->name());
1613+ report->session_disconnect_called(session->name());
1614
1615- session_store->close_session(application_session);
1616- application_session.reset();
1617+ shell->close_session(session);
1618+ session.reset();
1619
1620 done->Run();
1621 }
1622
1623=== renamed file 'src/server/frontend/application_mediator_android.cpp' => 'src/server/frontend/session_mediator_android.cpp'
1624--- src/server/frontend/application_mediator_android.cpp 2013-03-07 08:04:05 +0000
1625+++ src/server/frontend/session_mediator_android.cpp 2013-03-15 13:09:22 +0000
1626@@ -16,23 +16,23 @@
1627 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
1628 */
1629
1630-#include "mir/frontend/application_mediator.h"
1631-#include "mir/frontend/application_mediator_report.h"
1632-#include "mir/shell/session.h"
1633+#include "mir/frontend/session_mediator.h"
1634+#include "mir/frontend/session_mediator_report.h"
1635+#include "mir/frontend/session.h"
1636 #include <boost/throw_exception.hpp>
1637
1638 #include <stdexcept>
1639
1640-void mir::frontend::ApplicationMediator::drm_auth_magic(
1641+void mir::frontend::SessionMediator::drm_auth_magic(
1642 google::protobuf::RpcController* /*controller*/,
1643 const mir::protobuf::DRMMagic* /*request*/,
1644 mir::protobuf::DRMAuthMagicStatus* /*response*/,
1645 google::protobuf::Closure* /*done*/)
1646 {
1647- if (application_session.get() == nullptr)
1648+ if (session.get() == nullptr)
1649 BOOST_THROW_EXCEPTION(std::logic_error("Invalid application session"));
1650
1651- report->application_drm_auth_magic_called(application_session->name());
1652+ report->session_drm_auth_magic_called(session->name());
1653
1654 BOOST_THROW_EXCEPTION(std::logic_error("drm_auth_magic request not supported by the Android platform"));
1655 }
1656
1657=== renamed file 'src/server/frontend/application_mediator_gbm.cpp' => 'src/server/frontend/session_mediator_gbm.cpp'
1658--- src/server/frontend/application_mediator_gbm.cpp 2013-03-07 08:04:05 +0000
1659+++ src/server/frontend/session_mediator_gbm.cpp 2013-03-15 13:09:22 +0000
1660@@ -16,9 +16,9 @@
1661 * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
1662 */
1663
1664-#include "mir/frontend/application_mediator.h"
1665-#include "mir/frontend/application_mediator_report.h"
1666-#include "mir/shell/session.h"
1667+#include "mir/frontend/session_mediator.h"
1668+#include "mir/frontend/session_mediator_report.h"
1669+#include "mir/frontend/session.h"
1670 #include "mir/graphics/drm_authenticator.h"
1671 #include "mir/graphics/platform.h"
1672
1673@@ -30,16 +30,16 @@
1674
1675 namespace mg = mir::graphics;
1676
1677-void mir::frontend::ApplicationMediator::drm_auth_magic(
1678+void mir::frontend::SessionMediator::drm_auth_magic(
1679 google::protobuf::RpcController* /*controller*/,
1680 const mir::protobuf::DRMMagic* request,
1681 mir::protobuf::DRMAuthMagicStatus* response,
1682 google::protobuf::Closure* done)
1683 {
1684- if (application_session.get() == nullptr)
1685+ if (session.get() == nullptr)
1686 BOOST_THROW_EXCEPTION(std::logic_error("Invalid application session"));
1687
1688- report->application_drm_auth_magic_called(application_session->name());
1689+ report->session_drm_auth_magic_called(session->name());
1690
1691 auto const magic = static_cast<drm_magic_t>(request->magic());
1692 auto authenticator = std::dynamic_pointer_cast<mg::DRMAuthenticator>(graphics_platform);
1693
1694=== renamed file 'src/server/shell/surface_creation_parameters.cpp' => 'src/server/frontend/surface_creation_parameters.cpp'
1695--- src/server/shell/surface_creation_parameters.cpp 2013-03-07 08:04:05 +0000
1696+++ src/server/frontend/surface_creation_parameters.cpp 2013-03-15 13:09:22 +0000
1697@@ -19,23 +19,23 @@
1698 #include "mir/shell/surface_creation_parameters.h"
1699
1700 namespace mc = mir::compositor;
1701-namespace msh = mir::shell;
1702+namespace mf = mir::frontend;
1703 namespace geom = mir::geometry;
1704
1705-msh::SurfaceCreationParameters::SurfaceCreationParameters()
1706+mf::SurfaceCreationParameters::SurfaceCreationParameters()
1707 : name(), size(), buffer_usage(mc::BufferUsage::undefined),
1708 pixel_format(geom::PixelFormat::invalid)
1709 {
1710 }
1711
1712-msh::SurfaceCreationParameters& msh::SurfaceCreationParameters::of_name(std::string const& new_name)
1713+mf::SurfaceCreationParameters& mf::SurfaceCreationParameters::of_name(std::string const& new_name)
1714 {
1715 name = new_name;
1716 return *this;
1717 }
1718
1719
1720-msh::SurfaceCreationParameters& msh::SurfaceCreationParameters::of_size(
1721+mf::SurfaceCreationParameters& mf::SurfaceCreationParameters::of_size(
1722 geometry::Size new_size)
1723 {
1724 size = new_size;
1725@@ -43,14 +43,14 @@
1726 return *this;
1727 }
1728
1729-msh::SurfaceCreationParameters& msh::SurfaceCreationParameters::of_size(
1730+mf::SurfaceCreationParameters& mf::SurfaceCreationParameters::of_size(
1731 geometry::Width::ValueType width,
1732 geometry::Height::ValueType height)
1733 {
1734 return of_size(geometry::Size(geometry::Width(width), geometry::Height(height)));
1735 }
1736
1737-msh::SurfaceCreationParameters& msh::SurfaceCreationParameters::of_buffer_usage(
1738+mf::SurfaceCreationParameters& mf::SurfaceCreationParameters::of_buffer_usage(
1739 mc::BufferUsage new_buffer_usage)
1740 {
1741 buffer_usage = new_buffer_usage;
1742@@ -58,7 +58,7 @@
1743 return *this;
1744 }
1745
1746-msh::SurfaceCreationParameters& msh::SurfaceCreationParameters::of_pixel_format(
1747+mf::SurfaceCreationParameters& mf::SurfaceCreationParameters::of_pixel_format(
1748 geom::PixelFormat new_pixel_format)
1749 {
1750 pixel_format = new_pixel_format;
1751@@ -66,23 +66,23 @@
1752 return *this;
1753 }
1754
1755-bool msh::operator==(
1756+bool mf::operator==(
1757 const SurfaceCreationParameters& lhs,
1758- const msh::SurfaceCreationParameters& rhs)
1759+ const mf::SurfaceCreationParameters& rhs)
1760 {
1761 return lhs.size == rhs.size &&
1762 lhs.buffer_usage == rhs.buffer_usage &&
1763 lhs.pixel_format == rhs.pixel_format;
1764 }
1765
1766-bool msh::operator!=(
1767+bool mf::operator!=(
1768 const SurfaceCreationParameters& lhs,
1769- const msh::SurfaceCreationParameters& rhs)
1770+ const mf::SurfaceCreationParameters& rhs)
1771 {
1772 return !(lhs == rhs);
1773 }
1774
1775-msh::SurfaceCreationParameters msh::a_surface()
1776+mf::SurfaceCreationParameters mf::a_surface()
1777 {
1778 return SurfaceCreationParameters();
1779 }
1780
1781=== modified file 'src/server/logging/CMakeLists.txt'
1782--- src/server/logging/CMakeLists.txt 2013-03-07 08:04:05 +0000
1783+++ src/server/logging/CMakeLists.txt 2013-03-15 13:09:22 +0000
1784@@ -2,7 +2,7 @@
1785 LOGGING_SOURCES
1786
1787 dumb_console_logger.cpp
1788- application_mediator_report.cpp
1789+ session_mediator_report.cpp
1790 display_report.cpp
1791 )
1792
1793
1794=== renamed file 'src/server/logging/application_mediator_report.cpp' => 'src/server/logging/session_mediator_report.cpp'
1795--- src/server/logging/application_mediator_report.cpp 2013-03-04 16:02:02 +0000
1796+++ src/server/logging/session_mediator_report.cpp 2013-03-15 13:09:22 +0000
1797@@ -16,7 +16,7 @@
1798 * Authored by: Alan Griffiths <alan@octopull.co.uk>
1799 */
1800
1801-#include "mir/logging/application_mediator_report.h"
1802+#include "mir/logging/session_mediator_report.h"
1803
1804 #include "mir/logging/logger.h"
1805
1806@@ -28,45 +28,45 @@
1807 namespace ml = mir::logging;
1808
1809
1810-ml::ApplicationMediatorReport::ApplicationMediatorReport(std::shared_ptr<Logger> const& log) :
1811+ml::SessionMediatorReport::SessionMediatorReport(std::shared_ptr<Logger> const& log) :
1812 log(log)
1813 {
1814 }
1815
1816-void ml::ApplicationMediatorReport::application_connect_called(std::string const& app_name)
1817-{
1818- log->log<Logger::informational>("application_connect(\"" + app_name + "\")", component);
1819-}
1820-
1821-void ml::ApplicationMediatorReport::application_create_surface_called(std::string const& app_name)
1822-{
1823- log->log<Logger::informational>("application_create_surface(\"" + app_name + "\")", component);
1824-}
1825-
1826-void ml::ApplicationMediatorReport::application_next_buffer_called(std::string const& app_name)
1827-{
1828- log->log<Logger::informational>("application_next_buffer_called(\"" + app_name + "\")", component);
1829-}
1830-
1831-void ml::ApplicationMediatorReport::application_release_surface_called(std::string const& app_name)
1832-{
1833- log->log<Logger::informational>("application_release_surface_called(\"" + app_name + "\")", component);
1834-}
1835-
1836-void ml::ApplicationMediatorReport::application_disconnect_called(std::string const& app_name)
1837-{
1838- log->log<Logger::informational>("application_disconnect_called(\"" + app_name + "\")", component);
1839-}
1840-
1841-void ml::ApplicationMediatorReport::application_drm_auth_magic_called(std::string const& app_name)
1842-{
1843- log->log<Logger::informational>("application_drm_auth_magic_called(\"" + app_name + "\")", component);
1844-}
1845-
1846-void ml::ApplicationMediatorReport::application_error(
1847+void ml::SessionMediatorReport::session_connect_called(std::string const& app_name)
1848+{
1849+ log->log<Logger::informational>("session_connect(\"" + app_name + "\")", component);
1850+}
1851+
1852+void ml::SessionMediatorReport::session_create_surface_called(std::string const& app_name)
1853+{
1854+ log->log<Logger::informational>("session_create_surface(\"" + app_name + "\")", component);
1855+}
1856+
1857+void ml::SessionMediatorReport::session_next_buffer_called(std::string const& app_name)
1858+{
1859+ log->log<Logger::informational>("session_next_buffer_called(\"" + app_name + "\")", component);
1860+}
1861+
1862+void ml::SessionMediatorReport::session_release_surface_called(std::string const& app_name)
1863+{
1864+ log->log<Logger::informational>("session_release_surface_called(\"" + app_name + "\")", component);
1865+}
1866+
1867+void ml::SessionMediatorReport::session_disconnect_called(std::string const& app_name)
1868+{
1869+ log->log<Logger::informational>("session_disconnect_called(\"" + app_name + "\")", component);
1870+}
1871+
1872+void ml::SessionMediatorReport::session_drm_auth_magic_called(std::string const& app_name)
1873+{
1874+ log->log<Logger::informational>("session_drm_auth_magic_called(\"" + app_name + "\")", component);
1875+}
1876+
1877+void ml::SessionMediatorReport::session_error(
1878 std::string const& app_name,
1879 char const* method,
1880 std::string const& what)
1881 {
1882- log->log<Logger::error>(std::string(method) + " - application_error(\"" + app_name + "\"):\n" + what, component);
1883+ log->log<Logger::error>(std::string(method) + " - session_error(\"" + app_name + "\"):\n" + what, component);
1884 }
1885
1886=== modified file 'src/server/shell/CMakeLists.txt'
1887--- src/server/shell/CMakeLists.txt 2013-03-07 08:04:05 +0000
1888+++ src/server/shell/CMakeLists.txt 2013-03-15 13:09:22 +0000
1889@@ -8,7 +8,6 @@
1890 single_visibility_focus_mechanism.cpp
1891 consuming_placement_strategy.cpp
1892 organising_surface_factory.cpp
1893- surface_creation_parameters.cpp
1894 )
1895
1896 add_library(
1897
1898=== modified file 'src/server/shell/application_session.cpp'
1899--- src/server/shell/application_session.cpp 2013-03-07 08:04:05 +0000
1900+++ src/server/shell/application_session.cpp 2013-03-15 13:09:22 +0000
1901@@ -17,7 +17,7 @@
1902 */
1903
1904 #include "mir/shell/application_session.h"
1905-#include "mir/shell/surface.h"
1906+#include "mir/frontend/surface.h"
1907
1908 #include "mir/surfaces/surface_controller.h"
1909
1910@@ -28,6 +28,7 @@
1911 #include <cassert>
1912 #include <algorithm>
1913
1914+namespace mf = mir::frontend;
1915 namespace msh = mir::shell;
1916 namespace ms = mir::surfaces;
1917
1918@@ -50,12 +51,12 @@
1919 }
1920 }
1921
1922-msh::SurfaceId msh::ApplicationSession::next_id()
1923+mf::SurfaceId msh::ApplicationSession::next_id()
1924 {
1925- return SurfaceId(next_surface_id.fetch_add(1));
1926+ return mf::SurfaceId(next_surface_id.fetch_add(1));
1927 }
1928
1929-msh::SurfaceId msh::ApplicationSession::create_surface(const SurfaceCreationParameters& params)
1930+mf::SurfaceId msh::ApplicationSession::create_surface(const mf::SurfaceCreationParameters& params)
1931 {
1932 auto surf = surface_factory->create_surface(params);
1933 auto const id = next_id();
1934@@ -65,7 +66,7 @@
1935 return id;
1936 }
1937
1938-msh::ApplicationSession::Surfaces::const_iterator msh::ApplicationSession::checked_find(SurfaceId id) const
1939+msh::ApplicationSession::Surfaces::const_iterator msh::ApplicationSession::checked_find(mf::SurfaceId id) const
1940 {
1941 auto p = surfaces.find(id);
1942 if (p == surfaces.end())
1943@@ -75,14 +76,14 @@
1944 return p;
1945 }
1946
1947-std::shared_ptr<msh::Surface> msh::ApplicationSession::get_surface(msh::SurfaceId id) const
1948+std::shared_ptr<mf::Surface> msh::ApplicationSession::get_surface(mf::SurfaceId id) const
1949 {
1950 std::unique_lock<std::mutex> lock(surfaces_mutex);
1951
1952 return checked_find(id)->second;
1953 }
1954
1955-void msh::ApplicationSession::destroy_surface(msh::SurfaceId id)
1956+void msh::ApplicationSession::destroy_surface(mf::SurfaceId id)
1957 {
1958 std::unique_lock<std::mutex> lock(surfaces_mutex);
1959 auto p = checked_find(id);
1960
1961=== modified file 'src/server/shell/consuming_placement_strategy.cpp'
1962--- src/server/shell/consuming_placement_strategy.cpp 2013-03-07 08:04:05 +0000
1963+++ src/server/shell/consuming_placement_strategy.cpp 2013-03-15 13:09:22 +0000
1964@@ -22,6 +22,7 @@
1965
1966 #include <algorithm>
1967
1968+namespace mf = mir::frontend;
1969 namespace msh = mir::shell;
1970 namespace mg = mir::graphics;
1971 namespace geom = mir::geometry;
1972@@ -31,7 +32,7 @@
1973 {
1974 }
1975
1976-msh::SurfaceCreationParameters msh::ConsumingPlacementStrategy::place(msh::SurfaceCreationParameters const& request_parameters)
1977+mf::SurfaceCreationParameters msh::ConsumingPlacementStrategy::place(mf::SurfaceCreationParameters const& request_parameters)
1978 {
1979 // We would like to try to fill placement requests
1980 auto placed_parameters = request_parameters;
1981
1982=== modified file 'src/server/shell/organising_surface_factory.cpp'
1983--- src/server/shell/organising_surface_factory.cpp 2013-03-07 08:04:05 +0000
1984+++ src/server/shell/organising_surface_factory.cpp 2013-03-15 13:09:22 +0000
1985@@ -20,6 +20,7 @@
1986 #include "mir/shell/placement_strategy.h"
1987 #include "mir/shell/surface_creation_parameters.h"
1988
1989+namespace mf = mir::frontend;
1990 namespace msh = mir::shell;
1991
1992 msh::OrganisingSurfaceFactory::OrganisingSurfaceFactory(std::shared_ptr<msh::SurfaceFactory> const& underlying_factory,
1993@@ -33,7 +34,7 @@
1994 {
1995 }
1996
1997-std::shared_ptr<msh::Surface> msh::OrganisingSurfaceFactory::create_surface(const msh::SurfaceCreationParameters& params)
1998+std::shared_ptr<mf::Surface> msh::OrganisingSurfaceFactory::create_surface(const mf::SurfaceCreationParameters& params)
1999 {
2000 auto placed_params = placement_strategy->place(params);
2001
2002
2003=== modified file 'src/server/shell/registration_order_focus_sequence.cpp'
2004--- src/server/shell/registration_order_focus_sequence.cpp 2013-03-07 08:04:05 +0000
2005+++ src/server/shell/registration_order_focus_sequence.cpp 2013-03-15 13:09:22 +0000
2006@@ -17,8 +17,8 @@
2007 */
2008
2009 #include "mir/shell/registration_order_focus_sequence.h"
2010-#include "mir/shell/session.h"
2011-#include "mir/shell/session_container.h"
2012+#include "mir/frontend/session.h"
2013+#include "mir/frontend/session_container.h"
2014
2015 #include <boost/throw_exception.hpp>
2016
2017@@ -28,6 +28,7 @@
2018 #include <stdexcept>
2019
2020
2021+namespace mf = mir::frontend;
2022 namespace msh = mir::shell;
2023
2024 msh::RegistrationOrderFocusSequence::RegistrationOrderFocusSequence(std::shared_ptr<msh::SessionContainer> const& app_container) :
2025@@ -36,13 +37,13 @@
2026
2027 }
2028
2029-std::shared_ptr<msh::Session> msh::RegistrationOrderFocusSequence::successor_of(std::shared_ptr<msh::Session> const& focused_app) const
2030+std::shared_ptr<mf::Session> msh::RegistrationOrderFocusSequence::successor_of(std::shared_ptr<mf::Session> const& focused_app) const
2031 {
2032- std::shared_ptr<msh::Session> result, first;
2033+ std::shared_ptr<mf::Session> result, first;
2034 bool found{false};
2035
2036 session_container->for_each(
2037- [&](std::shared_ptr<msh::Session> const& session)
2038+ [&](std::shared_ptr<mf::Session> const& session)
2039 {
2040 if (!first)
2041 {
2042@@ -72,13 +73,13 @@
2043 }
2044 }
2045
2046-std::shared_ptr<msh::Session> msh::RegistrationOrderFocusSequence::predecessor_of(std::shared_ptr<msh::Session> const& focused_app) const
2047+std::shared_ptr<mf::Session> msh::RegistrationOrderFocusSequence::predecessor_of(std::shared_ptr<mf::Session> const& focused_app) const
2048 {
2049- std::shared_ptr<msh::Session> result, last;
2050+ std::shared_ptr<mf::Session> result, last;
2051 bool found{false};
2052
2053 session_container->for_each(
2054- [&](std::shared_ptr<msh::Session> const& session)
2055+ [&](std::shared_ptr<mf::Session> const& session)
2056 {
2057 last = session;
2058 if (focused_app == session)
2059@@ -105,12 +106,12 @@
2060 }
2061 }
2062
2063-std::shared_ptr<msh::Session> msh::RegistrationOrderFocusSequence::default_focus() const
2064+std::shared_ptr<mf::Session> msh::RegistrationOrderFocusSequence::default_focus() const
2065 {
2066- std::shared_ptr<msh::Session> result;
2067+ std::shared_ptr<mf::Session> result;
2068
2069 session_container->for_each(
2070- [&](std::shared_ptr<msh::Session> const& session)
2071+ [&](std::shared_ptr<mf::Session> const& session)
2072 {
2073 result = session;
2074 });
2075
2076=== modified file 'src/server/shell/session_container.cpp'
2077--- src/server/shell/session_container.cpp 2013-03-07 08:04:05 +0000
2078+++ src/server/shell/session_container.cpp 2013-03-15 13:09:22 +0000
2079@@ -16,8 +16,8 @@
2080 * Authored By: Robert Carr <robert.carr@canonical.com>
2081 */
2082
2083-#include "mir/shell/session_container.h"
2084-#include "mir/shell/session.h"
2085+#include "mir/frontend/session_container.h"
2086+#include "mir/frontend/session.h"
2087
2088 #include <boost/throw_exception.hpp>
2089
2090@@ -27,6 +27,7 @@
2091 #include <stdexcept>
2092
2093
2094+namespace mf = mir::frontend;
2095 namespace msh = mir::shell;
2096
2097 msh::SessionContainer::SessionContainer()
2098@@ -38,7 +39,7 @@
2099 {
2100 }
2101
2102-void msh::SessionContainer::insert_session(std::shared_ptr<msh::Session> const& session)
2103+void msh::SessionContainer::insert_session(std::shared_ptr<mf::Session> const& session)
2104 {
2105 std::unique_lock<std::mutex> lk(guard);
2106 auto name = session->name();
2107@@ -46,7 +47,7 @@
2108 apps.push_back(session);
2109 }
2110
2111-void msh::SessionContainer::remove_session(std::shared_ptr<msh::Session> const& session)
2112+void msh::SessionContainer::remove_session(std::shared_ptr<mf::Session> const& session)
2113 {
2114 std::unique_lock<std::mutex> lk(guard);
2115
2116@@ -61,7 +62,7 @@
2117 }
2118 }
2119
2120-void msh::SessionContainer::for_each(std::function<void(std::shared_ptr<Session> const&)> f) const
2121+void msh::SessionContainer::for_each(std::function<void(std::shared_ptr<mf::Session> const&)> f) const
2122 {
2123 std::unique_lock<std::mutex> lk(guard);
2124
2125
2126=== modified file 'src/server/shell/session_manager.cpp'
2127--- src/server/shell/session_manager.cpp 2013-03-07 08:04:05 +0000
2128+++ src/server/shell/session_manager.cpp 2013-03-15 13:09:22 +0000
2129@@ -18,7 +18,7 @@
2130
2131 #include "mir/shell/session_manager.h"
2132 #include "mir/shell/application_session.h"
2133-#include "mir/shell/session_container.h"
2134+#include "mir/frontend/session_container.h"
2135 #include "mir/shell/surface_factory.h"
2136 #include "mir/shell/focus_sequence.h"
2137 #include "mir/shell/focus_setter.h"
2138@@ -27,6 +27,7 @@
2139 #include <cassert>
2140 #include <algorithm>
2141
2142+namespace mf = mir::frontend;
2143 namespace msh = mir::shell;
2144
2145 msh::SessionManager::SessionManager(
2146@@ -49,7 +50,7 @@
2147 {
2148 }
2149
2150-std::shared_ptr<msh::Session> msh::SessionManager::open_session(std::string const& name)
2151+std::shared_ptr<mf::Session> msh::SessionManager::open_session(std::string const& name)
2152 {
2153 auto new_session = std::make_shared<msh::ApplicationSession>(surface_factory, name);
2154
2155@@ -64,13 +65,13 @@
2156 return new_session;
2157 }
2158
2159-inline void msh::SessionManager::set_focus_to(std::shared_ptr<Session> const& next_focus)
2160+inline void msh::SessionManager::set_focus_to(std::shared_ptr<mf::Session> const& next_focus)
2161 {
2162 focus_application = next_focus;
2163 focus_setter->set_focus_to(next_focus);
2164 }
2165
2166-void msh::SessionManager::close_session(std::shared_ptr<msh::Session> const& session)
2167+void msh::SessionManager::close_session(std::shared_ptr<mf::Session> const& session)
2168 {
2169 std::unique_lock<std::mutex> lock(mutex);
2170
2171@@ -102,13 +103,13 @@
2172
2173 void msh::SessionManager::shutdown()
2174 {
2175- app_container->for_each([](std::shared_ptr<Session> const& session)
2176+ app_container->for_each([](std::shared_ptr<mf::Session> const& session)
2177 {
2178 session->shutdown();
2179 });
2180 }
2181
2182-void msh::SessionManager::tag_session_with_lightdm_id(std::shared_ptr<Session> const& session, int id)
2183+void msh::SessionManager::tag_session_with_lightdm_id(std::shared_ptr<mf::Session> const& session, int id)
2184 {
2185 std::unique_lock<std::mutex> lock(mutex);
2186 typedef Tags::value_type Pair;
2187
2188=== modified file 'src/server/shell/single_visibility_focus_mechanism.cpp'
2189--- src/server/shell/single_visibility_focus_mechanism.cpp 2013-03-07 08:04:05 +0000
2190+++ src/server/shell/single_visibility_focus_mechanism.cpp 2013-03-15 13:09:22 +0000
2191@@ -16,10 +16,11 @@
2192 * Authored By: Robert Carr <robert.carr@canonical.com>
2193 */
2194
2195-#include "mir/shell/session_container.h"
2196-#include "mir/shell/session.h"
2197+#include "mir/frontend/session_container.h"
2198+#include "mir/frontend/session.h"
2199 #include "mir/shell/single_visibility_focus_mechanism.h"
2200
2201+namespace mf = mir::frontend;
2202 namespace msh = mir::shell;
2203
2204 msh::SingleVisibilityFocusMechanism::SingleVisibilityFocusMechanism(std::shared_ptr<msh::SessionContainer> const& app_container) :
2205@@ -27,10 +28,10 @@
2206 {
2207 }
2208
2209-void msh::SingleVisibilityFocusMechanism::set_focus_to(std::shared_ptr<msh::Session> const& focus_session)
2210+void msh::SingleVisibilityFocusMechanism::set_focus_to(std::shared_ptr<mf::Session> const& focus_session)
2211 {
2212 app_container->for_each(
2213- [&](std::shared_ptr<msh::Session> const& session) {
2214+ [&](std::shared_ptr<mf::Session> const& session) {
2215 if (session == focus_session)
2216 {
2217 session->show();
2218
2219=== modified file 'src/server/surfaces/proxy_surface.cpp'
2220--- src/server/surfaces/proxy_surface.cpp 2013-03-07 08:04:05 +0000
2221+++ src/server/surfaces/proxy_surface.cpp 2013-03-15 13:09:22 +0000
2222@@ -112,7 +112,7 @@
2223
2224 ms::ProxySurface::ProxySurface(
2225 SurfaceStackModel* const surface_stack_,
2226- shell::SurfaceCreationParameters const& params) :
2227+ frontend::SurfaceCreationParameters const& params) :
2228 BasicProxySurface(surface_stack_->create_surface(params)),
2229 surface_stack(surface_stack_)
2230 {
2231
2232=== modified file 'src/server/surfaces/proxy_surface.h'
2233--- src/server/surfaces/proxy_surface.h 2013-03-07 08:04:05 +0000
2234+++ src/server/surfaces/proxy_surface.h 2013-03-15 13:09:22 +0000
2235@@ -20,21 +20,21 @@
2236 #ifndef PROXY_SURFACE_H_
2237 #define PROXY_SURFACE_H_
2238
2239-#include "mir/shell/surface.h"
2240+#include "mir/frontend/surface.h"
2241 #include "mir/surfaces/surface.h"
2242
2243 namespace mir
2244 {
2245-namespace shell
2246+namespace frontend
2247 {
2248-class SurfaceCreationParameters;
2249+struct SurfaceCreationParameters;
2250 }
2251
2252 namespace surfaces
2253 {
2254 class SurfaceStackModel;
2255
2256-class BasicProxySurface : public shell::Surface
2257+class BasicProxySurface : public frontend::Surface
2258 {
2259 public:
2260
2261@@ -68,7 +68,7 @@
2262 public:
2263 ProxySurface(
2264 SurfaceStackModel* const surface_stack_,
2265- shell::SurfaceCreationParameters const& params);
2266+ frontend::SurfaceCreationParameters const& params);
2267
2268 void destroy();
2269
2270
2271=== modified file 'src/server/surfaces/surface_controller.cpp'
2272--- src/server/surfaces/surface_controller.cpp 2013-03-07 08:04:05 +0000
2273+++ src/server/surfaces/surface_controller.cpp 2013-03-15 13:09:22 +0000
2274@@ -17,23 +17,22 @@
2275 */
2276
2277 #include "mir/surfaces/surface_controller.h"
2278-#include "mir/surfaces/surface.h"
2279 #include "mir/surfaces/surface_stack_model.h"
2280-#include "mir/shell/surface.h"
2281+#include "mir/frontend/surface.h"
2282
2283 #include "proxy_surface.h"
2284
2285 #include <cassert>
2286
2287 namespace ms = mir::surfaces;
2288-namespace msh = mir::shell;
2289+namespace mf = mir::frontend;
2290
2291 ms::SurfaceController::SurfaceController(std::shared_ptr<SurfaceStackModel> const& surface_stack) : surface_stack(surface_stack)
2292 {
2293 assert(surface_stack);
2294 }
2295
2296-std::shared_ptr<msh::Surface> ms::SurfaceController::create_surface(const msh::SurfaceCreationParameters& params)
2297+std::shared_ptr<mf::Surface> ms::SurfaceController::create_surface(const mf::SurfaceCreationParameters& params)
2298 {
2299 return std::make_shared<ProxySurface>(surface_stack.get(), params);
2300 }
2301
2302=== modified file 'src/server/surfaces/surface_stack.cpp'
2303--- src/server/surfaces/surface_stack.cpp 2013-03-07 08:04:05 +0000
2304+++ src/server/surfaces/surface_stack.cpp 2013-03-15 13:09:22 +0000
2305@@ -51,7 +51,7 @@
2306 }
2307
2308
2309-std::weak_ptr<ms::Surface> ms::SurfaceStack::create_surface(const shell::SurfaceCreationParameters& params)
2310+std::weak_ptr<ms::Surface> ms::SurfaceStack::create_surface(const frontend::SurfaceCreationParameters& params)
2311 {
2312 std::lock_guard<std::mutex> lg(guard);
2313
2314
2315=== modified file 'tests/acceptance-tests/test_focus_management_api.cpp'
2316--- tests/acceptance-tests/test_focus_management_api.cpp 2013-03-07 08:04:05 +0000
2317+++ tests/acceptance-tests/test_focus_management_api.cpp 2013-03-15 13:09:22 +0000
2318@@ -18,7 +18,7 @@
2319
2320 #include "mir_toolkit/mir_client_library_lightdm.h"
2321
2322-#include "mir/shell/session_store.h"
2323+#include "mir/frontend/shell.h"
2324
2325 #include "mir_test_doubles/mock_display.h"
2326 #include "mir_test_framework/display_server_test_fixture.h"
2327@@ -30,6 +30,7 @@
2328 #include <thread>
2329 #include <fcntl.h>
2330
2331+namespace mf = mir::frontend;
2332 namespace mg = mir::graphics;
2333 namespace geom = mir::geometry;
2334 namespace mtd = mir::test::doubles;
2335@@ -119,33 +120,33 @@
2336 }
2337 };
2338
2339-class MockSessionStore : public shell::SessionStore
2340+class MockShell : public frontend::Shell
2341 {
2342 public:
2343- MockSessionStore(std::shared_ptr<SessionStore> const& impl) :
2344+ MockShell(std::shared_ptr<Shell> const& impl) :
2345 impl(impl)
2346 {
2347 using namespace testing;
2348- using shell::SessionStore;
2349- ON_CALL(*this, open_session(_)).WillByDefault(Invoke(impl.get(), &SessionStore::open_session));
2350- ON_CALL(*this, close_session(_)).WillByDefault(Invoke(impl.get(), &SessionStore::close_session));
2351-
2352- ON_CALL(*this, tag_session_with_lightdm_id(_, _)).WillByDefault(Invoke(impl.get(), &SessionStore::tag_session_with_lightdm_id));
2353- ON_CALL(*this, focus_session_with_lightdm_id(_)).WillByDefault(Invoke(impl.get(), &SessionStore::focus_session_with_lightdm_id));
2354-
2355- ON_CALL(*this, shutdown()).WillByDefault(Invoke(impl.get(), &SessionStore::shutdown));
2356+ using frontend::Shell;
2357+ ON_CALL(*this, open_session(_)).WillByDefault(Invoke(impl.get(), &Shell::open_session));
2358+ ON_CALL(*this, close_session(_)).WillByDefault(Invoke(impl.get(), &Shell::close_session));
2359+
2360+ ON_CALL(*this, tag_session_with_lightdm_id(_, _)).WillByDefault(Invoke(impl.get(), &Shell::tag_session_with_lightdm_id));
2361+ ON_CALL(*this, focus_session_with_lightdm_id(_)).WillByDefault(Invoke(impl.get(), &Shell::focus_session_with_lightdm_id));
2362+
2363+ ON_CALL(*this, shutdown()).WillByDefault(Invoke(impl.get(), &Shell::shutdown));
2364 }
2365
2366- MOCK_METHOD1(open_session, std::shared_ptr<shell::Session> (std::string const& name));
2367- MOCK_METHOD1(close_session, void (std::shared_ptr<shell::Session> const& session));
2368+ MOCK_METHOD1(open_session, std::shared_ptr<mf::Session> (std::string const& name));
2369+ MOCK_METHOD1(close_session, void (std::shared_ptr<mf::Session> const& session));
2370
2371- MOCK_METHOD2(tag_session_with_lightdm_id, void (std::shared_ptr<shell::Session> const& session, int id));
2372+ MOCK_METHOD2(tag_session_with_lightdm_id, void (std::shared_ptr<mf::Session> const& session, int id));
2373 MOCK_METHOD1(focus_session_with_lightdm_id, void (int id));
2374
2375 MOCK_METHOD0(shutdown, void ());
2376
2377 private:
2378- std::shared_ptr<shell::SessionStore> const impl;
2379+ std::shared_ptr<frontend::Shell> const impl;
2380 };
2381 }
2382
2383@@ -153,33 +154,33 @@
2384 {
2385 struct ServerConfig : TestingServerConfiguration
2386 {
2387- std::shared_ptr<shell::SessionStore>
2388- the_session_store()
2389+ std::shared_ptr<frontend::Shell>
2390+ the_frontend_shell() override
2391 {
2392- return session_store(
2393- [this]() -> std::shared_ptr<shell::SessionStore>
2394+ return session_manager(
2395+ [this]() -> std::shared_ptr<frontend::Shell>
2396 {
2397 using namespace ::testing;
2398
2399- auto const& mock_session_store = std::make_shared<MockSessionStore>(
2400- DefaultServerConfiguration::the_session_store());
2401+ auto const& mock_shell = std::make_shared<MockShell>(
2402+ DefaultServerConfiguration::the_frontend_shell());
2403
2404 {
2405 using namespace testing;
2406 InSequence setup;
2407- EXPECT_CALL(*mock_session_store, open_session(_)).Times(2);
2408- EXPECT_CALL(*mock_session_store, close_session(_)).Times(2);
2409- EXPECT_CALL(*mock_session_store, shutdown());
2410+ EXPECT_CALL(*mock_shell, open_session(_)).Times(2);
2411+ EXPECT_CALL(*mock_shell, close_session(_)).Times(2);
2412+ EXPECT_CALL(*mock_shell, shutdown());
2413 }
2414 {
2415 using namespace testing;
2416 InSequence test;
2417
2418- EXPECT_CALL(*mock_session_store, tag_session_with_lightdm_id(_, _));
2419- EXPECT_CALL(*mock_session_store, focus_session_with_lightdm_id(_));
2420+ EXPECT_CALL(*mock_shell, tag_session_with_lightdm_id(_, _));
2421+ EXPECT_CALL(*mock_shell, focus_session_with_lightdm_id(_));
2422 }
2423
2424- return mock_session_store;
2425+ return mock_shell;
2426 });
2427 }
2428 } server_config;
2429
2430=== modified file 'tests/behavior-tests/session_management_context.cpp'
2431--- tests/behavior-tests/session_management_context.cpp 2013-03-13 07:41:46 +0000
2432+++ tests/behavior-tests/session_management_context.cpp 2013-03-15 13:09:22 +0000
2433@@ -18,17 +18,18 @@
2434
2435 #include "mir_test_cucumber/session_management_context.h"
2436
2437-#include "mir/shell/surface.h"
2438+#include "mir/frontend/surface.h"
2439 #include "mir/shell/surface_creation_parameters.h"
2440-#include "mir/shell/session.h"
2441+#include "mir/frontend/session.h"
2442 #include "mir/shell/registration_order_focus_sequence.h"
2443 #include "mir/shell/single_visibility_focus_mechanism.h"
2444-#include "mir/shell/session_container.h"
2445-#include "mir/shell/session_store.h"
2446+#include "mir/frontend/session_container.h"
2447+#include "mir/frontend/shell.h"
2448 #include "mir/shell/surface_factory.h"
2449 #include "mir/graphics/display.h"
2450 #include "mir/default_server_configuration.h"
2451
2452+namespace mf = mir::frontend;
2453 namespace msh = mir::shell;
2454
2455 namespace mg = mir::graphics;
2456@@ -51,7 +52,7 @@
2457 static const geom::Rectangle default_view_area = geom::Rectangle{geom::Point(),
2458 default_view_size};
2459
2460-struct DummySurface : public msh::Surface
2461+struct DummySurface : public mf::Surface
2462 {
2463 explicit DummySurface() {}
2464 virtual ~DummySurface() {}
2465@@ -98,7 +99,7 @@
2466 {
2467 }
2468
2469- std::shared_ptr<msh::Surface> create_surface(const msh::SurfaceCreationParameters& params)
2470+ std::shared_ptr<mf::Surface> create_surface(const mf::SurfaceCreationParameters& params)
2471 {
2472 auto name = params.name;
2473 return std::make_shared<SizedDummySurface>(params.size);
2474@@ -156,21 +157,21 @@
2475
2476 mtc::SessionManagementContext::SessionManagementContext() :
2477 view_area(std::make_shared<mtc::SizedDisplay>()),
2478- session_store(server_configuration.the_session_store())
2479+ shell(server_configuration.the_frontend_shell())
2480 {
2481 }
2482
2483 mtc::SessionManagementContext::SessionManagementContext(ServerConfiguration& server_configuration) :
2484 view_area(std::make_shared<mtc::SizedDisplay>()),
2485- session_store(server_configuration.the_session_store())
2486+ shell(server_configuration.the_frontend_shell())
2487 {
2488 }
2489
2490 // TODO: This will be less awkward with the ApplicationWindow class.
2491 bool mtc::SessionManagementContext::open_window_consuming(std::string const& window_name)
2492 {
2493- auto const params = msh::a_surface().of_name(window_name);
2494- auto session = session_store->open_session(window_name);
2495+ auto const params = mf::a_surface().of_name(window_name);
2496+ auto session = shell->open_session(window_name);
2497 auto const surface_id = session->create_surface(params);
2498
2499 open_windows[window_name] = std::make_tuple(session, surface_id);
2500@@ -181,8 +182,8 @@
2501 bool mtc::SessionManagementContext::open_window_with_size(std::string const& window_name,
2502 geom::Size const& size)
2503 {
2504- auto const params = msh::a_surface().of_name(window_name).of_size(size);
2505- auto session = session_store->open_session(window_name);
2506+ auto const params = mf::a_surface().of_name(window_name).of_size(size);
2507+ auto session = shell->open_session(window_name);
2508 auto const surface_id = session->create_surface(params);
2509
2510 open_windows[window_name] = std::make_tuple(session, surface_id);
2511
2512=== modified file 'tests/integration-tests/cucumber/test_session_management_context.cpp'
2513--- tests/integration-tests/cucumber/test_session_management_context.cpp 2013-03-13 07:41:46 +0000
2514+++ tests/integration-tests/cucumber/test_session_management_context.cpp 2013-03-15 13:09:22 +0000
2515@@ -18,14 +18,14 @@
2516
2517 #include "mir_test_cucumber/session_management_context.h"
2518 #include "mir/server_configuration.h"
2519-#include "mir/shell/session_store.h"
2520-#include "mir/shell/session.h"
2521-#include "mir/shell/surface.h"
2522+#include "mir/frontend/shell.h"
2523+#include "mir/frontend/session.h"
2524+#include "mir/frontend/surface.h"
2525 #include "mir/shell/surface_creation_parameters.h"
2526 #include "mir/graphics/viewable_area.h"
2527
2528 #include "mir_test_doubles/mock_session.h"
2529-#include "mir_test_doubles/mock_session_store.h"
2530+#include "mir_test_doubles/mock_shell.h"
2531 #include "mir_test/fake_shared.h"
2532
2533 #include <gtest/gtest.h>
2534@@ -35,7 +35,6 @@
2535 namespace mc = mir::compositor;
2536 namespace mf = mir::frontend;
2537 namespace mi = mir::input;
2538-namespace msh = mir::shell;
2539 namespace geom = mir::geometry;
2540 namespace mt = mir::test;
2541 namespace mtd = mir::test::doubles;
2542@@ -47,13 +46,13 @@
2543 struct MockServerConfiguration : public mir::ServerConfiguration
2544 {
2545 MOCK_METHOD0(the_communicator, std::shared_ptr<mf::Communicator>());
2546- MOCK_METHOD0(the_session_store, std::shared_ptr<msh::SessionStore>());
2547+ MOCK_METHOD0(the_frontend_shell, std::shared_ptr<mf::Shell>());
2548 MOCK_METHOD0(the_input_manager, std::shared_ptr<mi::InputManager>());
2549 MOCK_METHOD0(the_display, std::shared_ptr<mg::Display>());
2550 MOCK_METHOD0(the_drawer, std::shared_ptr<mc::Drawer>());
2551 };
2552
2553-struct MockSurface : public msh::Surface
2554+struct MockSurface : public mf::Surface
2555 {
2556 MOCK_METHOD0(hide, void());
2557 MOCK_METHOD0(show, void());
2558@@ -94,15 +93,15 @@
2559 {
2560 using namespace ::testing;
2561
2562- EXPECT_CALL(server_configuration, the_session_store()).Times(1)
2563- .WillOnce(Return(mt::fake_shared<msh::SessionStore>(session_store)));
2564+ EXPECT_CALL(server_configuration, the_frontend_shell()).Times(1)
2565+ .WillOnce(Return(mt::fake_shared<mf::Shell>(shell)));
2566 ctx = std::make_shared<mtc::SessionManagementContext>(server_configuration);
2567 }
2568 MockServerConfiguration server_configuration;
2569- mtd::MockSessionStore session_store;
2570+ mtd::MockShell shell;
2571 std::shared_ptr<mtc::SessionManagementContext> ctx;
2572
2573- static msh::SurfaceId const test_surface_id;
2574+ static mf::SurfaceId const test_surface_id;
2575 static std::string const test_window_name;
2576 static geom::Size const test_window_size;
2577 };
2578@@ -113,8 +112,8 @@
2579 {
2580 using namespace ::testing;
2581
2582- EXPECT_CALL(server_configuration, the_session_store()).Times(1)
2583- .WillOnce(Return(mt::fake_shared<msh::SessionStore>(session_store)));
2584+ EXPECT_CALL(server_configuration, the_frontend_shell()).Times(1)
2585+ .WillOnce(Return(mt::fake_shared<mf::Shell>(shell)));
2586 ctx = std::make_shared<mtc::SessionManagementContext>(server_configuration);
2587 viewable_area = ctx->get_view_area();
2588 }
2589@@ -122,21 +121,21 @@
2590 std::shared_ptr<mg::ViewableArea> viewable_area;
2591 };
2592
2593-msh::SurfaceId const SessionManagementContextSetup::test_surface_id{1};
2594+mf::SurfaceId const SessionManagementContextSetup::test_surface_id{1};
2595 std::string const SessionManagementContextSetup::test_window_name{"John"};
2596 geom::Size const SessionManagementContextSetup::test_window_size{geom::Width{100},
2597 geom::Height{100}};
2598 } // namespace
2599
2600-TEST(SessionManagementContext, constructs_session_store_from_server_configuration)
2601+TEST(SessionManagementContext, constructs_shell_from_server_configuration)
2602 {
2603 using namespace ::testing;
2604
2605 MockServerConfiguration server_configuration;
2606- mtd::MockSessionStore session_store;
2607+ mtd::MockShell shell;
2608
2609- EXPECT_CALL(server_configuration, the_session_store()).Times(1)
2610- .WillOnce(Return(mt::fake_shared<msh::SessionStore>(session_store)));
2611+ EXPECT_CALL(server_configuration, the_frontend_shell()).Times(1)
2612+ .WillOnce(Return(mt::fake_shared<mf::Shell>(shell)));
2613
2614 mtc::SessionManagementContext ctx(server_configuration);
2615 }
2616@@ -147,8 +146,8 @@
2617
2618 mtd::MockSession session;
2619
2620- EXPECT_CALL(session_store, open_session(test_window_name)).Times(1)
2621- .WillOnce(Return(mt::fake_shared<msh::Session>(session)));
2622+ EXPECT_CALL(shell, open_session(test_window_name)).Times(1)
2623+ .WillOnce(Return(mt::fake_shared<mf::Session>(session)));
2624
2625 // As consuming mode is the default, omiting geometry is sufficient to request it.
2626 EXPECT_CALL(session, create_surface(NamedWindowWithNoGeometry(test_window_name))).Times(1)
2627@@ -163,8 +162,8 @@
2628
2629 mtd::MockSession session;
2630
2631- EXPECT_CALL(session_store, open_session(test_window_name)).Times(1)
2632- .WillOnce(Return(mt::fake_shared<msh::Session>(session)));
2633+ EXPECT_CALL(shell, open_session(test_window_name)).Times(1)
2634+ .WillOnce(Return(mt::fake_shared<mf::Session>(session)));
2635
2636 EXPECT_CALL(session, create_surface(NamedWindowWithGeometry(test_window_name, test_window_size))).Times(1)
2637 .WillOnce(Return(test_surface_id));
2638@@ -179,8 +178,8 @@
2639 mtd::MockSession session;
2640 MockSurface surface;
2641
2642- EXPECT_CALL(session_store, open_session(test_window_name)).Times(1)
2643- .WillOnce(Return(mt::fake_shared<msh::Session>(session)));
2644+ EXPECT_CALL(shell, open_session(test_window_name)).Times(1)
2645+ .WillOnce(Return(mt::fake_shared<mf::Session>(session)));
2646
2647 EXPECT_CALL(session, create_surface(NamedWindowWithGeometry(test_window_name, test_window_size))).Times(1)
2648 .WillOnce(Return(test_surface_id));
2649@@ -188,7 +187,7 @@
2650 EXPECT_TRUE(ctx->open_window_with_size(test_window_name, test_window_size));
2651
2652 EXPECT_CALL(session, get_surface(test_surface_id)).Times(1)
2653- .WillOnce(Return(mt::fake_shared<msh::Surface>(surface)));
2654+ .WillOnce(Return(mt::fake_shared<mf::Surface>(surface)));
2655 EXPECT_CALL(surface, size()).Times(1).WillOnce(Return(test_window_size));
2656
2657 EXPECT_EQ(test_window_size, ctx->get_window_size(test_window_name));
2658
2659=== modified file 'tests/integration-tests/frontend/test_application_mediator_report.cpp'
2660--- tests/integration-tests/frontend/test_application_mediator_report.cpp 2013-03-07 08:04:05 +0000
2661+++ tests/integration-tests/frontend/test_application_mediator_report.cpp 2013-03-15 13:09:22 +0000
2662@@ -17,7 +17,7 @@
2663 */
2664
2665 #include "mir_toolkit/mir_client_library.h"
2666-#include "mir/frontend/application_mediator_report.h"
2667+#include "mir/frontend/session_mediator_report.h"
2668
2669 #include "mir_test_framework/display_server_test_fixture.h"
2670 #include "mir_test/test_protobuf_client.h"
2671@@ -31,31 +31,31 @@
2672
2673 namespace
2674 {
2675-struct MockApplicationMediatorReport : mf::NullApplicationMediatorReport
2676+struct MockApplicationMediatorReport : mf::NullSessionMediatorReport
2677 {
2678 MockApplicationMediatorReport()
2679 {
2680- EXPECT_CALL(*this, application_connect_called(testing::_)).
2681- Times(testing::AtLeast(0));
2682-
2683- EXPECT_CALL(*this, application_create_surface_called(testing::_)).
2684- Times(testing::AtLeast(0));
2685-
2686- EXPECT_CALL(*this, application_next_buffer_called(testing::_)).
2687- Times(testing::AtLeast(0));
2688-
2689- EXPECT_CALL(*this, application_release_surface_called(testing::_)).
2690- Times(testing::AtLeast(0));
2691-
2692- EXPECT_CALL(*this, application_disconnect_called(testing::_)).
2693+ EXPECT_CALL(*this, session_connect_called(testing::_)).
2694+ Times(testing::AtLeast(0));
2695+
2696+ EXPECT_CALL(*this, session_create_surface_called(testing::_)).
2697+ Times(testing::AtLeast(0));
2698+
2699+ EXPECT_CALL(*this, session_next_buffer_called(testing::_)).
2700+ Times(testing::AtLeast(0));
2701+
2702+ EXPECT_CALL(*this, session_release_surface_called(testing::_)).
2703+ Times(testing::AtLeast(0));
2704+
2705+ EXPECT_CALL(*this, session_disconnect_called(testing::_)).
2706 Times(testing::AtLeast(0));
2707 }
2708
2709- MOCK_METHOD1(application_connect_called, void (std::string const&));
2710- MOCK_METHOD1(application_create_surface_called, void (std::string const&));
2711- MOCK_METHOD1(application_next_buffer_called, void (std::string const&));
2712- MOCK_METHOD1(application_release_surface_called, void (std::string const&));
2713- MOCK_METHOD1(application_disconnect_called, void (std::string const&));
2714+ MOCK_METHOD1(session_connect_called, void (std::string const&));
2715+ MOCK_METHOD1(session_create_surface_called, void (std::string const&));
2716+ MOCK_METHOD1(session_next_buffer_called, void (std::string const&));
2717+ MOCK_METHOD1(session_release_surface_called, void (std::string const&));
2718+ MOCK_METHOD1(session_disconnect_called, void (std::string const&));
2719 };
2720
2721 const int rpc_timeout_ms{100000};
2722@@ -63,16 +63,16 @@
2723 typedef BespokeDisplayServerTestFixture ApplicationMediatorReport;
2724 }
2725
2726-TEST_F(ApplicationMediatorReport, application_connect_called)
2727+TEST_F(ApplicationMediatorReport, session_connect_called)
2728 {
2729 struct Server : TestingServerConfiguration
2730 {
2731- std::shared_ptr<mf::ApplicationMediatorReport>
2732+ std::shared_ptr<mf::SessionMediatorReport>
2733 the_application_mediator_report()
2734 {
2735 auto result = std::make_shared<MockApplicationMediatorReport>();
2736
2737- EXPECT_CALL(*result, application_connect_called(testing::_)).
2738+ EXPECT_CALL(*result, session_connect_called(testing::_)).
2739 Times(1);
2740
2741 return result;
2742@@ -104,16 +104,16 @@
2743 launch_client_process(client_process);
2744 }
2745
2746-TEST_F(ApplicationMediatorReport, application_create_surface_called)
2747+TEST_F(ApplicationMediatorReport, session_create_surface_called)
2748 {
2749 struct Server : TestingServerConfiguration
2750 {
2751- std::shared_ptr<mf::ApplicationMediatorReport>
2752+ std::shared_ptr<mf::SessionMediatorReport>
2753 the_application_mediator_report()
2754 {
2755 auto result = std::make_shared<MockApplicationMediatorReport>();
2756
2757- EXPECT_CALL(*result, application_create_surface_called(testing::_)).
2758+ EXPECT_CALL(*result, session_create_surface_called(testing::_)).
2759 Times(1);
2760
2761 return result;
2762@@ -155,16 +155,16 @@
2763 launch_client_process(client_process);
2764 }
2765
2766-TEST_F(ApplicationMediatorReport, application_next_buffer_called)
2767+TEST_F(ApplicationMediatorReport, session_next_buffer_called)
2768 {
2769 struct Server : TestingServerConfiguration
2770 {
2771- std::shared_ptr<mf::ApplicationMediatorReport>
2772+ std::shared_ptr<mf::SessionMediatorReport>
2773 the_application_mediator_report()
2774 {
2775 auto result = std::make_shared<MockApplicationMediatorReport>();
2776
2777- EXPECT_CALL(*result, application_next_buffer_called(testing::_)).
2778+ EXPECT_CALL(*result, session_next_buffer_called(testing::_)).
2779 Times(1);
2780
2781 return result;
2782@@ -212,16 +212,16 @@
2783 launch_client_process(client_process);
2784 }
2785
2786-TEST_F(ApplicationMediatorReport, application_release_surface_called)
2787+TEST_F(ApplicationMediatorReport, session_release_surface_called)
2788 {
2789 struct Server : TestingServerConfiguration
2790 {
2791- std::shared_ptr<mf::ApplicationMediatorReport>
2792+ std::shared_ptr<mf::SessionMediatorReport>
2793 the_application_mediator_report()
2794 {
2795 auto result = std::make_shared<MockApplicationMediatorReport>();
2796
2797- EXPECT_CALL(*result, application_release_surface_called(testing::_)).
2798+ EXPECT_CALL(*result, session_release_surface_called(testing::_)).
2799 Times(1);
2800
2801 return result;
2802@@ -278,16 +278,16 @@
2803 launch_client_process(client_process);
2804 }
2805
2806-TEST_F(ApplicationMediatorReport, application_disconnect_called)
2807+TEST_F(ApplicationMediatorReport, session_disconnect_called)
2808 {
2809 struct Server : TestingServerConfiguration
2810 {
2811- std::shared_ptr<mf::ApplicationMediatorReport>
2812+ std::shared_ptr<mf::SessionMediatorReport>
2813 the_application_mediator_report()
2814 {
2815 auto result = std::make_shared<MockApplicationMediatorReport>();
2816
2817- EXPECT_CALL(*result, application_disconnect_called(testing::_)).
2818+ EXPECT_CALL(*result, session_disconnect_called(testing::_)).
2819 Times(1);
2820
2821 return result;
2822
2823=== modified file 'tests/integration-tests/frontend/test_session_manager.cpp'
2824--- tests/integration-tests/frontend/test_session_manager.cpp 2013-03-07 08:04:05 +0000
2825+++ tests/integration-tests/frontend/test_session_manager.cpp 2013-03-15 13:09:22 +0000
2826@@ -25,7 +25,7 @@
2827 #include "mir/shell/focus_sequence.h"
2828 #include "mir/shell/focus_setter.h"
2829 #include "mir/shell/registration_order_focus_sequence.h"
2830-#include "mir/shell/session_container.h"
2831+#include "mir/frontend/session_container.h"
2832 #include "mir/shell/surface_creation_parameters.h"
2833
2834 #include <gmock/gmock.h>
2835@@ -35,6 +35,7 @@
2836 #include "mir_test_doubles/mock_surface_factory.h"
2837
2838 namespace mc = mir::compositor;
2839+namespace mf = mir::frontend;
2840 namespace msh = mir::shell;
2841 namespace ms = mir::surfaces;
2842 namespace mt = mir::test;
2843@@ -45,7 +46,7 @@
2844
2845 struct MockFocusSetter: public msh::FocusSetter
2846 {
2847- MOCK_METHOD1(set_focus_to, void(std::shared_ptr<msh::Session> const&));
2848+ MOCK_METHOD1(set_focus_to, void(std::shared_ptr<mf::Session> const&));
2849 };
2850
2851 }
2852@@ -57,7 +58,7 @@
2853 std::shared_ptr<msh::SessionContainer> container(new msh::SessionContainer());
2854 msh::RegistrationOrderFocusSequence sequence(container);
2855 MockFocusSetter focus_changer;
2856- std::shared_ptr<msh::Session> new_session;
2857+ std::shared_ptr<mf::Session> new_session;
2858
2859 msh::SessionManager session_manager(
2860 mt::fake_shared(surface_factory),
2861@@ -90,7 +91,7 @@
2862 std::shared_ptr<msh::SessionContainer> model(new msh::SessionContainer());
2863 msh::RegistrationOrderFocusSequence sequence(model);
2864 MockFocusSetter focus_changer;
2865- std::shared_ptr<msh::Session> new_session;
2866+ std::shared_ptr<mf::Session> new_session;
2867
2868 msh::SessionManager session_manager(
2869 mt::fake_shared(surface_factory),
2870
2871=== modified file 'tests/integration-tests/test_error_reporting.cpp'
2872--- tests/integration-tests/test_error_reporting.cpp 2013-03-07 08:04:05 +0000
2873+++ tests/integration-tests/test_error_reporting.cpp 2013-03-15 13:09:22 +0000
2874@@ -240,7 +240,7 @@
2875 struct ServerConfig : TestingServerConfiguration
2876 {
2877 std::shared_ptr<mf::ProtobufIpcFactory> the_ipc_factory(
2878- std::shared_ptr<mir::shell::SessionStore> const&,
2879+ std::shared_ptr<mir::frontend::Shell> const&,
2880 std::shared_ptr<mg::ViewableArea> const&,
2881 std::shared_ptr<mc::GraphicBufferAllocator> const&)
2882
2883
2884=== modified file 'tests/unit-tests/frontend/CMakeLists.txt'
2885--- tests/unit-tests/frontend/CMakeLists.txt 2013-03-07 08:04:05 +0000
2886+++ tests/unit-tests/frontend/CMakeLists.txt 2013-03-15 13:09:22 +0000
2887@@ -3,7 +3,7 @@
2888 ${CMAKE_CURRENT_SOURCE_DIR}/test_protobuf_surface_apis.cpp
2889 ${CMAKE_CURRENT_SOURCE_DIR}/test_protobuf_reports_errors.cpp
2890 ${CMAKE_CURRENT_SOURCE_DIR}/test_resource_cache.cpp
2891- ${CMAKE_CURRENT_SOURCE_DIR}/test_application_mediator.cpp
2892+ ${CMAKE_CURRENT_SOURCE_DIR}/test_session_mediator.cpp
2893 )
2894
2895 # TODO this test is a mess - something better is needed.
2896@@ -22,11 +22,11 @@
2897
2898 if (MIR_PLATFORM STREQUAL "android")
2899 list(APPEND UNIT_TEST_SOURCES
2900- ${CMAKE_CURRENT_SOURCE_DIR}/test_application_mediator_android.cpp
2901+ ${CMAKE_CURRENT_SOURCE_DIR}/test_session_mediator_android.cpp
2902 )
2903 elseif (MIR_PLATFORM STREQUAL "gbm")
2904 list(APPEND UNIT_TEST_SOURCES
2905- ${CMAKE_CURRENT_SOURCE_DIR}/test_application_mediator_gbm.cpp
2906+ ${CMAKE_CURRENT_SOURCE_DIR}/test_session_mediator_gbm.cpp
2907 )
2908 endif()
2909
2910
2911=== renamed file 'tests/unit-tests/frontend/test_application_mediator.cpp' => 'tests/unit-tests/frontend/test_session_mediator.cpp'
2912--- tests/unit-tests/frontend/test_application_mediator.cpp 2013-03-13 07:41:46 +0000
2913+++ tests/unit-tests/frontend/test_session_mediator.cpp 2013-03-15 13:09:22 +0000
2914@@ -19,8 +19,8 @@
2915 #include "mir/surfaces/buffer_bundle.h"
2916 #include "mir/compositor/buffer_ipc_package.h"
2917 #include "mir/compositor/graphic_buffer_allocator.h"
2918-#include "mir/frontend/application_mediator_report.h"
2919-#include "mir/frontend/application_mediator.h"
2920+#include "mir/frontend/session_mediator_report.h"
2921+#include "mir/frontend/session_mediator.h"
2922 #include "mir/frontend/resource_cache.h"
2923 #include "mir/shell/application_session.h"
2924 #include "mir/graphics/display.h"
2925@@ -28,7 +28,7 @@
2926 #include "mir/graphics/platform_ipc_package.h"
2927 #include "mir/surfaces/surface.h"
2928 #include "mir_test_doubles/null_display.h"
2929-#include "mir_test_doubles/mock_session_store.h"
2930+#include "mir_test_doubles/mock_shell.h"
2931 #include "mir_test_doubles/mock_surface.h"
2932 #include "mir_test_doubles/stub_buffer.h"
2933 #include "mir_test_doubles/stub_session.h"
2934@@ -69,7 +69,7 @@
2935 EXPECT_CALL(*mock_surface, advance_client_buffer()).Times(AnyNumber());
2936 }
2937
2938- std::shared_ptr<msh::Surface> get_surface(msh::SurfaceId /* surface */) const
2939+ std::shared_ptr<mf::Surface> get_surface(mf::SurfaceId /* surface */) const
2940 {
2941 return mock_surface;
2942 }
2943@@ -117,50 +117,50 @@
2944
2945 }
2946
2947-struct ApplicationMediatorTest : public ::testing::Test
2948+struct SessionMediatorTest : public ::testing::Test
2949 {
2950- ApplicationMediatorTest()
2951- : session_store{std::make_shared<testing::NiceMock<mtd::MockSessionStore>>()},
2952+ SessionMediatorTest()
2953+ : shell{std::make_shared<testing::NiceMock<mtd::MockShell>>()},
2954 graphics_platform{std::make_shared<StubPlatform>()},
2955 graphics_display{std::make_shared<mtd::NullDisplay>()},
2956 buffer_allocator{std::make_shared<testing::NiceMock<MockGraphicBufferAllocator>>()},
2957- report{std::make_shared<mf::NullApplicationMediatorReport>()},
2958+ report{std::make_shared<mf::NullSessionMediatorReport>()},
2959 resource_cache{std::make_shared<mf::ResourceCache>()},
2960- mediator{session_store, graphics_platform, graphics_display,
2961+ mediator{shell, graphics_platform, graphics_display,
2962 buffer_allocator, report, resource_cache},
2963 null_callback{google::protobuf::NewPermanentCallback(google::protobuf::DoNothing)}
2964 {
2965 using namespace ::testing;
2966
2967- ON_CALL(*session_store, open_session(_)).WillByDefault(Return(std::make_shared<StubbedSession>()));
2968+ ON_CALL(*shell, open_session(_)).WillByDefault(Return(std::make_shared<StubbedSession>()));
2969 }
2970
2971- std::shared_ptr<testing::NiceMock<mtd::MockSessionStore>> const session_store;
2972+ std::shared_ptr<testing::NiceMock<mtd::MockShell>> const shell;
2973 std::shared_ptr<mg::Platform> const graphics_platform;
2974 std::shared_ptr<mg::Display> const graphics_display;
2975 std::shared_ptr<testing::NiceMock<MockGraphicBufferAllocator>> const buffer_allocator;
2976- std::shared_ptr<mf::ApplicationMediatorReport> const report;
2977+ std::shared_ptr<mf::SessionMediatorReport> const report;
2978 std::shared_ptr<mf::ResourceCache> const resource_cache;
2979- mf::ApplicationMediator mediator;
2980+ mf::SessionMediator mediator;
2981
2982 std::unique_ptr<google::protobuf::Closure> null_callback;
2983 };
2984
2985
2986-TEST_F(ApplicationMediatorTest, disconnect_releases_session)
2987+TEST_F(SessionMediatorTest, disconnect_releases_session)
2988 {
2989 using namespace ::testing;
2990
2991 mp::ConnectParameters connect_parameters;
2992 mp::Connection connection;
2993
2994- EXPECT_CALL(*session_store, close_session(_)).Times(1);
2995+ EXPECT_CALL(*shell, close_session(_)).Times(1);
2996
2997 mediator.connect(nullptr, &connect_parameters, &connection, null_callback.get());
2998 mediator.disconnect(nullptr, nullptr, nullptr, null_callback.get());
2999 }
3000
3001-TEST_F(ApplicationMediatorTest, calling_methods_before_connect_throws)
3002+TEST_F(SessionMediatorTest, calling_methods_before_connect_throws)
3003 {
3004 EXPECT_THROW({
3005 mp::SurfaceParameters request;
3006@@ -194,7 +194,7 @@
3007 }, std::logic_error);
3008 }
3009
3010-TEST_F(ApplicationMediatorTest, calling_methods_after_connect_works)
3011+TEST_F(SessionMediatorTest, calling_methods_after_connect_works)
3012 {
3013 mp::ConnectParameters connect_parameters;
3014 mp::Connection connection;
3015@@ -222,7 +222,7 @@
3016 mediator.disconnect(nullptr, nullptr, nullptr, null_callback.get());
3017 }
3018
3019-TEST_F(ApplicationMediatorTest, calling_methods_after_disconnect_throws)
3020+TEST_F(SessionMediatorTest, calling_methods_after_disconnect_throws)
3021 {
3022 mp::ConnectParameters connect_parameters;
3023 mp::Connection connection;
3024@@ -263,7 +263,7 @@
3025 }, std::logic_error);
3026 }
3027
3028-TEST_F(ApplicationMediatorTest, can_reconnect_after_disconnect)
3029+TEST_F(SessionMediatorTest, can_reconnect_after_disconnect)
3030 {
3031 mp::ConnectParameters connect_parameters;
3032 mp::Connection connection;
3033@@ -275,7 +275,7 @@
3034 mediator.connect(nullptr, &connect_parameters, &connection, null_callback.get());
3035 }
3036
3037-TEST_F(ApplicationMediatorTest, connect_queries_supported_pixel_formats)
3038+TEST_F(SessionMediatorTest, connect_queries_supported_pixel_formats)
3039 {
3040 using namespace testing;
3041
3042
3043=== renamed file 'tests/unit-tests/frontend/test_application_mediator_android.cpp' => 'tests/unit-tests/frontend/test_session_mediator_android.cpp'
3044--- tests/unit-tests/frontend/test_application_mediator_android.cpp 2013-03-12 16:44:21 +0000
3045+++ tests/unit-tests/frontend/test_session_mediator_android.cpp 2013-03-15 13:09:22 +0000
3046@@ -17,11 +17,11 @@
3047 */
3048
3049 #include "mir/compositor/graphic_buffer_allocator.h"
3050-#include "mir/frontend/application_mediator_report.h"
3051-#include "mir/frontend/application_mediator.h"
3052+#include "mir/frontend/session_mediator_report.h"
3053+#include "mir/frontend/session_mediator.h"
3054 #include "mir/frontend/resource_cache.h"
3055 #include "mir/shell/application_session.h"
3056-#include "mir/shell/session_store.h"
3057+#include "mir/frontend/shell.h"
3058 #include "mir/shell/surface_creation_parameters.h"
3059 #include "mir/graphics/display.h"
3060 #include "mir/graphics/platform.h"
3061@@ -29,7 +29,7 @@
3062
3063 #include "mir_test_doubles/null_display.h"
3064 #include "mir_test_doubles/mock_session.h"
3065-#include "mir_test_doubles/stub_session_store.h"
3066+#include "mir_test_doubles/stub_shell.h"
3067
3068 #include <gtest/gtest.h>
3069
3070@@ -82,33 +82,33 @@
3071
3072 }
3073
3074-struct ApplicationMediatorAndroidTest : public ::testing::Test
3075+struct SessionMediatorAndroidTest : public ::testing::Test
3076 {
3077- ApplicationMediatorAndroidTest()
3078- : session_store{std::make_shared<mtd::StubSessionStore>()},
3079+ SessionMediatorAndroidTest()
3080+ : shell{std::make_shared<mtd::StubShell>()},
3081 graphics_platform{std::make_shared<StubPlatform>()},
3082 graphics_display{std::make_shared<mtd::NullDisplay>()},
3083 buffer_allocator{std::make_shared<StubGraphicBufferAllocator>()},
3084- report{std::make_shared<mf::NullApplicationMediatorReport>()},
3085+ report{std::make_shared<mf::NullSessionMediatorReport>()},
3086 resource_cache{std::make_shared<mf::ResourceCache>()},
3087- mediator{session_store, graphics_platform, graphics_display,
3088+ mediator{shell, graphics_platform, graphics_display,
3089 buffer_allocator, report, resource_cache},
3090 null_callback{google::protobuf::NewPermanentCallback(google::protobuf::DoNothing)}
3091 {
3092 }
3093
3094- std::shared_ptr<mtd::StubSessionStore> const session_store;
3095+ std::shared_ptr<mtd::StubShell> const shell;
3096 std::shared_ptr<StubPlatform> const graphics_platform;
3097 std::shared_ptr<mg::Display> const graphics_display;
3098 std::shared_ptr<mc::GraphicBufferAllocator> const buffer_allocator;
3099- std::shared_ptr<mf::ApplicationMediatorReport> const report;
3100+ std::shared_ptr<mf::SessionMediatorReport> const report;
3101 std::shared_ptr<mf::ResourceCache> const resource_cache;
3102- mf::ApplicationMediator mediator;
3103+ mf::SessionMediator mediator;
3104
3105 std::unique_ptr<google::protobuf::Closure> null_callback;
3106 };
3107
3108-TEST_F(ApplicationMediatorAndroidTest, drm_auth_magic_throws)
3109+TEST_F(SessionMediatorAndroidTest, drm_auth_magic_throws)
3110 {
3111 mp::ConnectParameters connect_parameters;
3112 mp::Connection connection;
3113
3114=== renamed file 'tests/unit-tests/frontend/test_application_mediator_gbm.cpp' => 'tests/unit-tests/frontend/test_session_mediator_gbm.cpp'
3115--- tests/unit-tests/frontend/test_application_mediator_gbm.cpp 2013-03-12 12:48:39 +0000
3116+++ tests/unit-tests/frontend/test_session_mediator_gbm.cpp 2013-03-15 13:09:22 +0000
3117@@ -17,11 +17,11 @@
3118 */
3119
3120 #include "mir/compositor/graphic_buffer_allocator.h"
3121-#include "mir/frontend/application_mediator_report.h"
3122-#include "mir/frontend/application_mediator.h"
3123+#include "mir/frontend/session_mediator_report.h"
3124+#include "mir/frontend/session_mediator.h"
3125 #include "mir/frontend/resource_cache.h"
3126 #include "mir/shell/application_session.h"
3127-#include "mir/shell/session_store.h"
3128+#include "mir/frontend/shell.h"
3129 #include "mir/shell/surface_creation_parameters.h"
3130 #include "mir/graphics/display.h"
3131 #include "mir/graphics/drm_authenticator.h"
3132@@ -33,7 +33,7 @@
3133
3134 #include "mir_test_doubles/null_display.h"
3135 #include "mir_test_doubles/mock_session.h"
3136-#include "mir_test_doubles/stub_session_store.h"
3137+#include "mir_test_doubles/stub_shell.h"
3138
3139 #include <gtest/gtest.h>
3140 #include <gmock/gmock.h>
3141@@ -87,33 +87,33 @@
3142
3143 }
3144
3145-struct ApplicationMediatorGBMTest : public ::testing::Test
3146+struct SessionMediatorGBMTest : public ::testing::Test
3147 {
3148- ApplicationMediatorGBMTest()
3149- : session_store{std::make_shared<mtd::StubSessionStore>()},
3150+ SessionMediatorGBMTest()
3151+ : shell{std::make_shared<mtd::StubShell>()},
3152 mock_platform{std::make_shared<MockAuthenticatingPlatform>()},
3153 graphics_display{std::make_shared<mtd::NullDisplay>()},
3154 buffer_allocator{std::make_shared<StubGraphicBufferAllocator>()},
3155- report{std::make_shared<mf::NullApplicationMediatorReport>()},
3156+ report{std::make_shared<mf::NullSessionMediatorReport>()},
3157 resource_cache{std::make_shared<mf::ResourceCache>()},
3158- mediator{session_store, mock_platform, graphics_display,
3159+ mediator{shell, mock_platform, graphics_display,
3160 buffer_allocator, report, resource_cache},
3161 null_callback{google::protobuf::NewPermanentCallback(google::protobuf::DoNothing)}
3162 {
3163 }
3164
3165- std::shared_ptr<mtd::StubSessionStore> const session_store;
3166+ std::shared_ptr<mtd::StubShell> const shell;
3167 std::shared_ptr<MockAuthenticatingPlatform> const mock_platform;
3168 std::shared_ptr<mg::Display> const graphics_display;
3169 std::shared_ptr<mc::GraphicBufferAllocator> const buffer_allocator;
3170- std::shared_ptr<mf::ApplicationMediatorReport> const report;
3171+ std::shared_ptr<mf::SessionMediatorReport> const report;
3172 std::shared_ptr<mf::ResourceCache> const resource_cache;
3173- mf::ApplicationMediator mediator;
3174+ mf::SessionMediator mediator;
3175
3176 std::unique_ptr<google::protobuf::Closure> null_callback;
3177 };
3178
3179-TEST_F(ApplicationMediatorGBMTest, drm_auth_magic_uses_drm_authenticator)
3180+TEST_F(SessionMediatorGBMTest, drm_auth_magic_uses_drm_authenticator)
3181 {
3182 mp::ConnectParameters connect_parameters;
3183 mp::Connection connection;
3184@@ -135,7 +135,7 @@
3185 EXPECT_EQ(no_error, status.status_code());
3186 }
3187
3188-TEST_F(ApplicationMediatorGBMTest, drm_auth_magic_sets_status_code_on_error)
3189+TEST_F(SessionMediatorGBMTest, drm_auth_magic_sets_status_code_on_error)
3190 {
3191 using namespace testing;
3192
3193
3194=== modified file 'tests/unit-tests/shell/test_application_session.cpp'
3195--- tests/unit-tests/shell/test_application_session.cpp 2013-03-13 07:41:46 +0000
3196+++ tests/unit-tests/shell/test_application_session.cpp 2013-03-15 13:09:22 +0000
3197@@ -29,6 +29,7 @@
3198 #include <gtest/gtest.h>
3199
3200 namespace mc = mir::compositor;
3201+namespace mf = mir::frontend;
3202 namespace msh = mir::shell;
3203 namespace ms = mir::surfaces;
3204 namespace mt = mir::test;
3205@@ -47,7 +48,7 @@
3206
3207 msh::ApplicationSession session(mt::fake_shared(surface_factory), "Foo");
3208
3209- msh::SurfaceCreationParameters params;
3210+ mf::SurfaceCreationParameters params;
3211 auto surf = session.create_surface(params);
3212
3213 session.destroy_surface(surf);
3214@@ -73,7 +74,7 @@
3215 EXPECT_CALL(*mock_surface, destroy()).Times(1);
3216 }
3217
3218- msh::SurfaceCreationParameters params;
3219+ mf::SurfaceCreationParameters params;
3220 auto surf = app_session.create_surface(params);
3221
3222 app_session.hide();
3223@@ -88,7 +89,7 @@
3224
3225 mtd::MockSurfaceFactory surface_factory;
3226 msh::ApplicationSession app_session(mt::fake_shared(surface_factory), "Foo");
3227- msh::SurfaceId invalid_surface_id = msh::SurfaceId{1};
3228+ mf::SurfaceId invalid_surface_id(1);
3229
3230 EXPECT_THROW({
3231 app_session.get_surface(invalid_surface_id);
3232@@ -101,7 +102,7 @@
3233
3234 mtd::MockSurfaceFactory surface_factory;
3235 msh::ApplicationSession app_session(mt::fake_shared(surface_factory), "Foo");
3236- msh::SurfaceId invalid_surface_id = msh::SurfaceId{1};
3237+ mf::SurfaceId invalid_surface_id(1);
3238
3239 EXPECT_THROW({
3240 app_session.destroy_surface(invalid_surface_id);
3241
3242=== modified file 'tests/unit-tests/shell/test_consuming_placement_strategy.cpp'
3243--- tests/unit-tests/shell/test_consuming_placement_strategy.cpp 2013-03-07 08:04:05 +0000
3244+++ tests/unit-tests/shell/test_consuming_placement_strategy.cpp 2013-03-15 13:09:22 +0000
3245@@ -24,6 +24,7 @@
3246 #include <gtest/gtest.h>
3247 #include <gmock/gmock.h>
3248
3249+namespace mf = mir::frontend;
3250 namespace msh = mir::shell;
3251 namespace geom = mir::geometry;
3252 namespace mtd = mir::test::doubles;
3253@@ -55,7 +56,7 @@
3254 EXPECT_CALL(*viewable_area, view_area()).Times(1);
3255
3256 msh::ConsumingPlacementStrategy placement_strategy(viewable_area);
3257- msh::SurfaceCreationParameters input_params;
3258+ mf::SurfaceCreationParameters input_params;
3259
3260 auto placed_params = placement_strategy.place(input_params);
3261 EXPECT_EQ(default_view_area.size.width.as_uint32_t(), placed_params.size.width.as_uint32_t());
3262@@ -71,7 +72,7 @@
3263 EXPECT_CALL(*viewable_area, view_area()).Times(1);
3264
3265 msh::ConsumingPlacementStrategy placement_strategy(viewable_area);
3266- msh::SurfaceCreationParameters input_params;
3267+ mf::SurfaceCreationParameters input_params;
3268
3269 input_params.size = requested_size;
3270
3271@@ -89,7 +90,7 @@
3272
3273 EXPECT_CALL(*viewable_area, view_area()).Times(1);
3274 msh::ConsumingPlacementStrategy placement_strategy(viewable_area);
3275- msh::SurfaceCreationParameters input_params;
3276+ mf::SurfaceCreationParameters input_params;
3277
3278 input_params.size = unreasonable_size;
3279
3280
3281=== modified file 'tests/unit-tests/shell/test_organising_surface_factory.cpp'
3282--- tests/unit-tests/shell/test_organising_surface_factory.cpp 2013-03-07 08:04:05 +0000
3283+++ tests/unit-tests/shell/test_organising_surface_factory.cpp 2013-03-15 13:09:22 +0000
3284@@ -25,6 +25,7 @@
3285 #include <gtest/gtest.h>
3286 #include <gmock/gmock.h>
3287
3288+namespace mf = mir::frontend;
3289 namespace msh = mir::shell;
3290 namespace geom = mir::geometry;
3291 namespace mtd = mir::test::doubles;
3292@@ -34,7 +35,7 @@
3293
3294 struct MockPlacementStrategy : public msh::PlacementStrategy
3295 {
3296- MOCK_METHOD1(place, msh::SurfaceCreationParameters(msh::SurfaceCreationParameters const&));
3297+ MOCK_METHOD1(place, mf::SurfaceCreationParameters(mf::SurfaceCreationParameters const&));
3298 };
3299
3300 struct OrganisingSurfaceFactorySetup : public testing::Test
3301@@ -48,7 +49,7 @@
3302
3303 placement_strategy = std::make_shared<MockPlacementStrategy>();
3304 }
3305- std::shared_ptr<msh::Surface> null_surface;
3306+ std::shared_ptr<mf::Surface> null_surface;
3307 std::shared_ptr<mtd::MockSurfaceFactory> underlying_surface_factory;
3308 std::shared_ptr<MockPlacementStrategy> placement_strategy;
3309 };
3310@@ -63,9 +64,9 @@
3311
3312 EXPECT_CALL(*underlying_surface_factory, create_surface(_)).Times(1);
3313
3314- auto params = msh::a_surface();
3315+ auto params = mf::a_surface();
3316 EXPECT_CALL(*placement_strategy, place(Ref(params))).Times(1)
3317- .WillOnce(Return(msh::a_surface()));
3318+ .WillOnce(Return(mf::a_surface()));
3319
3320 factory.create_surface(params);
3321 }
3322@@ -76,7 +77,7 @@
3323
3324 msh::OrganisingSurfaceFactory factory(underlying_surface_factory, placement_strategy);
3325
3326- auto params = msh::a_surface();
3327+ auto params = mf::a_surface();
3328 auto placed_params = params;
3329 placed_params.size.width = geom::Width{100};
3330
3331
3332=== modified file 'tests/unit-tests/shell/test_registration_order_focus_sequence.cpp'
3333--- tests/unit-tests/shell/test_registration_order_focus_sequence.cpp 2013-03-07 08:04:05 +0000
3334+++ tests/unit-tests/shell/test_registration_order_focus_sequence.cpp 2013-03-15 13:09:22 +0000
3335@@ -18,7 +18,7 @@
3336
3337 #include "mir/surfaces/buffer_bundle.h"
3338 #include "mir/shell/application_session.h"
3339-#include "mir/shell/session_container.h"
3340+#include "mir/frontend/session_container.h"
3341 #include "mir/shell/registration_order_focus_sequence.h"
3342 #include "mir/shell/surface_creation_parameters.h"
3343 #include "mir/surfaces/surface.h"
3344
3345=== modified file 'tests/unit-tests/shell/test_session_manager.cpp'
3346--- tests/unit-tests/shell/test_session_manager.cpp 2013-03-13 07:41:46 +0000
3347+++ tests/unit-tests/shell/test_session_manager.cpp 2013-03-15 13:09:22 +0000
3348@@ -18,8 +18,8 @@
3349
3350 #include "mir/surfaces/buffer_bundle.h"
3351 #include "mir/shell/session_manager.h"
3352-#include "mir/shell/session_container.h"
3353-#include "mir/shell/session.h"
3354+#include "mir/frontend/session_container.h"
3355+#include "mir/frontend/session.h"
3356 #include "mir/shell/surface_creation_parameters.h"
3357 #include "mir/shell/focus_sequence.h"
3358 #include "mir/shell/focus_setter.h"
3359@@ -35,6 +35,7 @@
3360 #include <gtest/gtest.h>
3361
3362 namespace mc = mir::compositor;
3363+namespace mf = mir::frontend;
3364 namespace msh = mir::shell;
3365 namespace ms = mir::surfaces;
3366 namespace geom = mir::geometry;
3367@@ -46,22 +47,22 @@
3368
3369 struct MockSessionContainer : public msh::SessionContainer
3370 {
3371- MOCK_METHOD1(insert_session, void(std::shared_ptr<msh::Session> const&));
3372- MOCK_METHOD1(remove_session, void(std::shared_ptr<msh::Session> const&));
3373+ MOCK_METHOD1(insert_session, void(std::shared_ptr<mf::Session> const&));
3374+ MOCK_METHOD1(remove_session, void(std::shared_ptr<mf::Session> const&));
3375 MOCK_METHOD0(lock, void());
3376 MOCK_METHOD0(unlock, void());
3377 };
3378
3379 struct MockFocusSequence: public msh::FocusSequence
3380 {
3381- MOCK_CONST_METHOD1(successor_of, std::shared_ptr<msh::Session>(std::shared_ptr<msh::Session> const&));
3382- MOCK_CONST_METHOD1(predecessor_of, std::shared_ptr<msh::Session>(std::shared_ptr<msh::Session> const&));
3383- MOCK_CONST_METHOD0(default_focus, std::shared_ptr<msh::Session>());
3384+ MOCK_CONST_METHOD1(successor_of, std::shared_ptr<mf::Session>(std::shared_ptr<mf::Session> const&));
3385+ MOCK_CONST_METHOD1(predecessor_of, std::shared_ptr<mf::Session>(std::shared_ptr<mf::Session> const&));
3386+ MOCK_CONST_METHOD0(default_focus, std::shared_ptr<mf::Session>());
3387 };
3388
3389 struct MockFocusSetter: public msh::FocusSetter
3390 {
3391- MOCK_METHOD1(set_focus_to, void(std::shared_ptr<msh::Session> const&));
3392+ MOCK_METHOD1(set_focus_to, void(std::shared_ptr<mf::Session> const&));
3393 };
3394
3395 struct SessionManagerSetup : public testing::Test
3396@@ -91,9 +92,9 @@
3397 EXPECT_CALL(container, insert_session(_)).Times(1);
3398 EXPECT_CALL(container, remove_session(_)).Times(1);
3399 EXPECT_CALL(focus_setter, set_focus_to(_));
3400- EXPECT_CALL(focus_setter, set_focus_to(std::shared_ptr<msh::Session>())).Times(1);
3401+ EXPECT_CALL(focus_setter, set_focus_to(std::shared_ptr<mf::Session>())).Times(1);
3402
3403- EXPECT_CALL(sequence, default_focus()).WillOnce(Return((std::shared_ptr<msh::Session>())));
3404+ EXPECT_CALL(sequence, default_focus()).WillOnce(Return((std::shared_ptr<mf::Session>())));
3405
3406 auto session = session_manager.open_session("Visual Basic Studio");
3407 session_manager.close_session(session);
3408@@ -107,7 +108,7 @@
3409 std::shared_ptr<ms::BufferBundle> buffer_bundle(new mtd::NullBufferBundle());
3410 std::shared_ptr<ms::Surface> dummy_surface(
3411 std::make_shared<ms::Surface>(
3412- msh::a_surface().name,
3413+ mf::a_surface().name,
3414 buffer_bundle));
3415 ON_CALL(surface_factory, create_surface(_)).WillByDefault(
3416 Return(std::make_shared<ms::BasicProxySurface>(dummy_surface)));
3417@@ -116,12 +117,12 @@
3418 EXPECT_CALL(container, remove_session(_)).Times(1);
3419
3420 EXPECT_CALL(focus_setter, set_focus_to(_)).Times(1);
3421- EXPECT_CALL(focus_setter, set_focus_to(std::shared_ptr<msh::Session>())).Times(1);
3422+ EXPECT_CALL(focus_setter, set_focus_to(std::shared_ptr<mf::Session>())).Times(1);
3423
3424- EXPECT_CALL(sequence, default_focus()).WillOnce(Return((std::shared_ptr<msh::Session>())));
3425+ EXPECT_CALL(sequence, default_focus()).WillOnce(Return((std::shared_ptr<mf::Session>())));
3426
3427 auto session = session_manager.open_session("Visual Basic Studio");
3428- session->create_surface(msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3429+ session->create_surface(mf::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3430
3431 session_manager.close_session(session);
3432 }
3433@@ -129,7 +130,7 @@
3434 TEST_F(SessionManagerSetup, new_applications_receive_focus)
3435 {
3436 using namespace ::testing;
3437- std::shared_ptr<msh::Session> new_session;
3438+ std::shared_ptr<mf::Session> new_session;
3439
3440 EXPECT_CALL(container, insert_session(_)).Times(1);
3441 EXPECT_CALL(focus_setter, set_focus_to(_)).WillOnce(SaveArg<0>(&new_session));
3442
3443=== modified file 'tests/unit-tests/shell/test_single_visibility_focus_mechanism.cpp'
3444--- tests/unit-tests/shell/test_single_visibility_focus_mechanism.cpp 2013-03-12 03:50:42 +0000
3445+++ tests/unit-tests/shell/test_single_visibility_focus_mechanism.cpp 2013-03-15 13:09:22 +0000
3446@@ -18,7 +18,7 @@
3447
3448 #include "mir/surfaces/buffer_bundle.h"
3449 #include "mir/shell/application_session.h"
3450-#include "mir/shell/session_container.h"
3451+#include "mir/frontend/session_container.h"
3452 #include "mir/shell/registration_order_focus_sequence.h"
3453 #include "mir/shell/single_visibility_focus_mechanism.h"
3454 #include "mir/shell/surface_creation_parameters.h"
3455
3456=== modified file 'tests/unit-tests/shell/test_the_session_container_implementation.cpp'
3457--- tests/unit-tests/shell/test_the_session_container_implementation.cpp 2013-03-07 08:04:05 +0000
3458+++ tests/unit-tests/shell/test_the_session_container_implementation.cpp 2013-03-15 13:09:22 +0000
3459@@ -18,7 +18,7 @@
3460
3461 #include "mir/surfaces/buffer_bundle.h"
3462 #include "mir/shell/application_session.h"
3463-#include "mir/shell/session_container.h"
3464+#include "mir/frontend/session_container.h"
3465 #include "mir/shell/surface_creation_parameters.h"
3466 #include "mir/surfaces/surface.h"
3467 #include "mir_test_doubles/mock_buffer_bundle.h"
3468@@ -28,6 +28,7 @@
3469 #include <gtest/gtest.h>
3470 #include <string>
3471
3472+namespace mf = mir::frontend;
3473 namespace msh = mir::shell;
3474 namespace mtd = mir::test::doubles;
3475
3476@@ -44,7 +45,7 @@
3477 {
3478 MOCK_METHOD1(check_name, void (std::string const&));
3479
3480- void operator()(std::shared_ptr<msh::Session> const& session)
3481+ void operator()(std::shared_ptr<mf::Session> const& session)
3482 {
3483 check_name(session->name());
3484 }
3485
3486=== modified file 'tests/unit-tests/surfaces/test_proxy_surface.cpp'
3487--- tests/unit-tests/surfaces/test_proxy_surface.cpp 2013-03-13 07:41:46 +0000
3488+++ tests/unit-tests/surfaces/test_proxy_surface.cpp 2013-03-15 13:09:22 +0000
3489@@ -30,7 +30,7 @@
3490 #include <gtest/gtest.h>
3491
3492 namespace ms = mir::surfaces;
3493-namespace msh = mir::shell;
3494+namespace mf = mir::frontend;
3495 namespace mc = mir::compositor;
3496 namespace geom = mir::geometry;
3497 namespace mtd = mir::test::doubles;
3498@@ -53,12 +53,12 @@
3499 WillByDefault(Invoke(this, &MockSurfaceStackModel::do_destroy_surface));
3500 }
3501
3502- MOCK_METHOD1(create_surface, std::weak_ptr<ms::Surface> (const msh::SurfaceCreationParameters&));
3503+ MOCK_METHOD1(create_surface, std::weak_ptr<ms::Surface> (const mf::SurfaceCreationParameters&));
3504
3505 MOCK_METHOD1(destroy_surface, void (std::weak_ptr<ms::Surface> const&));
3506
3507 private:
3508- std::weak_ptr<ms::Surface> do_create_surface(const msh::SurfaceCreationParameters& params)
3509+ std::weak_ptr<ms::Surface> do_create_surface(const mf::SurfaceCreationParameters& params)
3510 {
3511 surface = std::make_shared<ms::Surface>(
3512 params.name,
3513@@ -78,7 +78,7 @@
3514 TEST(SurfaceProxy, creation_and_destruction)
3515 {
3516 MockSurfaceStackModel surface_stack;
3517- msh::SurfaceCreationParameters params;
3518+ mf::SurfaceCreationParameters params;
3519
3520 using namespace testing;
3521 InSequence sequence;
3522@@ -93,7 +93,7 @@
3523 using namespace testing;
3524
3525 NiceMock<MockSurfaceStackModel> surface_stack;
3526- msh::SurfaceCreationParameters params;
3527+ mf::SurfaceCreationParameters params;
3528
3529 ms::ProxySurface test(&surface_stack, params);
3530
3531
3532=== modified file 'tests/unit-tests/surfaces/test_surface.cpp'
3533--- tests/unit-tests/surfaces/test_surface.cpp 2013-03-07 08:04:05 +0000
3534+++ tests/unit-tests/surfaces/test_surface.cpp 2013-03-15 13:09:22 +0000
3535@@ -25,7 +25,7 @@
3536 #include <gtest/gtest.h>
3537
3538 namespace ms = mir::surfaces;
3539-namespace msh = mir::shell;
3540+namespace mf = mir::frontend;
3541 namespace mc = mir::compositor;
3542 namespace geom = mir::geometry;
3543 namespace mtd = mir::test::doubles;
3544@@ -33,7 +33,7 @@
3545 TEST(SurfaceCreationParametersTest, default_creation_parameters)
3546 {
3547 using namespace geom;
3548- msh::SurfaceCreationParameters params;
3549+ mf::SurfaceCreationParameters params;
3550
3551 EXPECT_EQ(std::string(), params.name);
3552 EXPECT_EQ(Width(0), params.size.width);
3553@@ -41,7 +41,7 @@
3554 EXPECT_EQ(mc::BufferUsage::undefined, params.buffer_usage);
3555 EXPECT_EQ(geom::PixelFormat::invalid, params.pixel_format);
3556
3557- EXPECT_EQ(msh::a_surface(), params);
3558+ EXPECT_EQ(mf::a_surface(), params);
3559 }
3560
3561 TEST(SurfaceCreationParametersTest, builder_mutators)
3562@@ -52,7 +52,7 @@
3563 geom::PixelFormat const format{geom::PixelFormat::abgr_8888};
3564 std::string name{"surface"};
3565
3566- auto params = msh::a_surface().of_name(name)
3567+ auto params = mf::a_surface().of_name(name)
3568 .of_size(size)
3569 .of_buffer_usage(usage)
3570 .of_pixel_format(format);
3571@@ -70,12 +70,12 @@
3572 mc::BufferUsage const usage{mc::BufferUsage::hardware};
3573 geom::PixelFormat const format{geom::PixelFormat::abgr_8888};
3574
3575- auto params0 = msh::a_surface().of_name("surface0")
3576+ auto params0 = mf::a_surface().of_name("surface0")
3577 .of_size(size)
3578 .of_buffer_usage(usage)
3579 .of_pixel_format(format);
3580
3581- auto params1 = msh::a_surface().of_name("surface1")
3582+ auto params1 = mf::a_surface().of_name("surface1")
3583 .of_size(size)
3584 .of_buffer_usage(usage)
3585 .of_pixel_format(format);
3586@@ -97,7 +97,7 @@
3587 std::vector<geom::PixelFormat> const formats{geom::PixelFormat::abgr_8888,
3588 geom::PixelFormat::bgr_888};
3589
3590- std::vector<msh::SurfaceCreationParameters> params_vec;
3591+ std::vector<mf::SurfaceCreationParameters> params_vec;
3592
3593 for (auto const& size : sizes)
3594 {
3595@@ -105,7 +105,7 @@
3596 {
3597 for (auto const& format : formats)
3598 {
3599- auto cur_params = msh::a_surface().of_name("surface0")
3600+ auto cur_params = mf::a_surface().of_name("surface0")
3601 .of_size(size)
3602 .of_buffer_usage(usage)
3603 .of_pixel_format(format);
3604
3605=== modified file 'tests/unit-tests/surfaces/test_surface_stack.cpp'
3606--- tests/unit-tests/surfaces/test_surface_stack.cpp 2013-03-07 08:04:05 +0000
3607+++ tests/unit-tests/surfaces/test_surface_stack.cpp 2013-03-15 13:09:22 +0000
3608@@ -40,7 +40,7 @@
3609 namespace mc = mir::compositor;
3610 namespace mg = mir::graphics;
3611 namespace ms = mir::surfaces;
3612-namespace msh = mir::shell;
3613+namespace mf = mir::frontend;
3614 namespace geom = mir::geometry;
3615 namespace mt = mir::test;
3616 namespace mtd = mir::test::doubles;
3617@@ -125,7 +125,7 @@
3618
3619 ms::SurfaceStack stack(mt::fake_shared(buffer_bundle_factory));
3620 std::weak_ptr<ms::Surface> surface = stack.create_surface(
3621- msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3622+ mf::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3623
3624 stack.destroy_surface(surface);
3625 }
3626@@ -172,11 +172,11 @@
3627 ms::SurfaceStack stack(mt::fake_shared(buffer_bundle_factory));
3628
3629 auto surface1 = stack.create_surface(
3630- msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3631+ mf::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3632 auto surface2 = stack.create_surface(
3633- msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3634+ mf::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3635 auto surface3 = stack.create_surface(
3636- msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3637+ mf::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3638
3639 mtd::MockSurfaceRenderer renderer;
3640 MockFilterForRenderables filter;
3641@@ -210,11 +210,11 @@
3642 ms::SurfaceStack stack(mt::fake_shared(buffer_bundle_factory));
3643
3644 auto surface1 = stack.create_surface(
3645- msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3646+ mf::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3647 auto surface2 = stack.create_surface(
3648- msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3649+ mf::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3650 auto surface3 = stack.create_surface(
3651- msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3652+ mf::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3653
3654 mtd::MockSurfaceRenderer renderer;
3655 MockFilterForRenderables filter;
3656@@ -248,11 +248,11 @@
3657 ms::SurfaceStack stack(mt::fake_shared(buffer_bundle_factory));
3658
3659 auto surface1 = stack.create_surface(
3660- msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3661+ mf::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3662 auto surface2 = stack.create_surface(
3663- msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3664+ mf::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3665 auto surface3 = stack.create_surface(
3666- msh::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3667+ mf::a_surface().of_size(geom::Size{geom::Width{1024}, geom::Height{768}}));
3668
3669 mtd::MockSurfaceRenderer renderer;
3670 MockFilterForRenderables filter;
3671@@ -295,7 +295,7 @@
3672
3673 ms::SurfaceStack stack(mt::fake_shared(buffer_bundle_factory));
3674 std::weak_ptr<ms::Surface> surface = stack.create_surface(
3675- msh::a_surface().of_size(size).of_buffer_usage(usage).of_pixel_format(format));
3676+ mf::a_surface().of_size(size).of_buffer_usage(usage).of_pixel_format(format));
3677
3678 stack.destroy_surface(surface);
3679 }

Subscribers

People subscribed via source and target branches