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

Side by Side Diff: mash/shell/shell_application_delegate.h

Issue 1637113003: Add simplistic screenlock application. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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 | « mash/shell/public/interfaces/shell.mojom ('k') | mash/shell/shell_application_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MASH_SHELL_SHELL_APPLICATION_DELEGATE_H_ 5 #ifndef MASH_SHELL_SHELL_APPLICATION_DELEGATE_H_
6 #define MASH_SHELL_SHELL_APPLICATION_DELEGATE_H_ 6 #define MASH_SHELL_SHELL_APPLICATION_DELEGATE_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "mash/shell/public/interfaces/shell.mojom.h"
14 #include "mojo/common/weak_binding_set.h"
13 #include "mojo/shell/public/cpp/application_delegate.h" 15 #include "mojo/shell/public/cpp/application_delegate.h"
16 #include "mojo/shell/public/cpp/interface_factory.h"
14 17
15 namespace mojo { 18 namespace mojo {
16 class ApplicationConnection; 19 class ApplicationConnection;
17 } 20 }
18 21
19 namespace mash { 22 namespace mash {
20 namespace shell { 23 namespace shell {
21 24
22 class ShellApplicationDelegate : public mojo::ApplicationDelegate { 25 class ShellApplicationDelegate
26 : public mojo::ApplicationDelegate,
27 public mash::shell::mojom::Shell,
28 public mojo::InterfaceFactory<mash::shell::mojom::Shell> {
23 public: 29 public:
24 ShellApplicationDelegate(); 30 ShellApplicationDelegate();
25 ~ShellApplicationDelegate() override; 31 ~ShellApplicationDelegate() override;
26 32
27 private: 33 private:
28 // mojo::ApplicationDelegate: 34 // mojo::ApplicationDelegate:
29 void Initialize(mojo::ApplicationImpl* app) override; 35 void Initialize(mojo::ApplicationImpl* app) override;
30 bool ConfigureIncomingConnection( 36 bool ConfigureIncomingConnection(
31 mojo::ApplicationConnection* connection) override; 37 mojo::ApplicationConnection* connection) override;
32 38
39 // mash::shell::mojom::Shell:
40 void LockScreen() override;
41 void UnlockScreen() override;
42
43 // mojo::InterfaceFactory<mash::shell::mojom::Shell>:
44 void Create(mojo::ApplicationConnection* connection,
45 mojo::InterfaceRequest<mash::shell::mojom::Shell> r) override;
46
33 void StartWindowManager(); 47 void StartWindowManager();
34 void StartWallpaper(); 48 void StartWallpaper();
35 void StartShelf(); 49 void StartShelf();
36 void StartBrowserDriver(); 50 void StartBrowserDriver();
37 void StartQuickLaunch(); 51 void StartQuickLaunch();
38 52
53 void StartScreenlock();
54 void StopScreenlock();
55
39 // Starts the application at |url|, running |restart_callback| if the 56 // Starts the application at |url|, running |restart_callback| if the
40 // connection to the application is closed. 57 // connection to the application is closed.
41 void StartRestartableService(const std::string& url, 58 void StartRestartableService(const std::string& url,
42 const base::Closure& restart_callback); 59 const base::Closure& restart_callback);
43 60
44 mojo::ApplicationImpl* app_; 61 mojo::ApplicationImpl* app_;
45 std::map<std::string, scoped_ptr<mojo::ApplicationConnection>> connections_; 62 std::map<std::string, scoped_ptr<mojo::ApplicationConnection>> connections_;
63 mojo::WeakBindingSet<mash::shell::mojom::Shell> bindings_;
46 64
47 DISALLOW_COPY_AND_ASSIGN(ShellApplicationDelegate); 65 DISALLOW_COPY_AND_ASSIGN(ShellApplicationDelegate);
48 }; 66 };
49 67
50 } // namespace shell 68 } // namespace shell
51 } // namespace mash 69 } // namespace mash
52 70
53 #endif // MASH_SHELL_SHELL_APPLICATION_DELEGATE_H_ 71 #endif // MASH_SHELL_SHELL_APPLICATION_DELEGATE_H_
OLDNEW
« no previous file with comments | « mash/shell/public/interfaces/shell.mojom ('k') | mash/shell/shell_application_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698