Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Side by Side Diff: services/kiosk_wm/kiosk_wm.cc

Issue 1531403003: Delete the ViewManager and WindowManager services. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-3
Patch Set: rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/kiosk_wm/kiosk_wm.h ('k') | services/kiosk_wm/kiosk_wm_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "services/kiosk_wm/kiosk_wm.h"
6
7 #include "mojo/services/window_manager/interfaces/window_manager.mojom.h"
8 #include "services/kiosk_wm/kiosk_wm_controller.h"
9 #include "services/window_manager/window_manager_delegate.h"
10
11 namespace kiosk_wm {
12
13 KioskWM::KioskWM()
14 : window_manager_app_(new window_manager::WindowManagerApp(this)) {}
15
16 KioskWM::~KioskWM() {}
17
18 void KioskWM::Initialize(mojo::ApplicationImpl* app) {
19 window_manager_app_->Initialize(app);
20
21 // Format: --args-for="app_url default_url"
22 if (app->args().size() > 1) {
23 std::string default_url = app->args()[1];
24 mojo::WindowManagerPtr window_manager;
25 app->ConnectToService("mojo:kiosk_wm", &window_manager);
26 window_manager->Embed(default_url, nullptr, nullptr);
27 }
28 }
29
30 scoped_ptr<window_manager::WindowManagerController>
31 KioskWM::CreateWindowManagerController(
32 mojo::ApplicationConnection* connection,
33 window_manager::WindowManagerRoot* wm_root) {
34 return scoped_ptr<window_manager::WindowManagerController>(
35 new KioskWMController(wm_root));
36 }
37
38 bool KioskWM::ConfigureIncomingConnection(
39 mojo::ApplicationConnection* connection) {
40 window_manager_app_->ConfigureIncomingConnection(connection);
41 return true;
42 }
43
44 } // namespace kiosk_wm
OLDNEW
« no previous file with comments | « services/kiosk_wm/kiosk_wm.h ('k') | services/kiosk_wm/kiosk_wm_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698