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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/shell/shell_application_delegate.h
diff --git a/mash/shell/shell_application_delegate.h b/mash/shell/shell_application_delegate.h
index c2230dd8680fb7ac2c5534e52a28760999314571..9ded1811a42c5ac25a7444401603a156501fb7b8 100644
--- a/mash/shell/shell_application_delegate.h
+++ b/mash/shell/shell_application_delegate.h
@@ -10,7 +10,10 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "mash/shell/public/interfaces/shell.mojom.h"
+#include "mojo/common/weak_binding_set.h"
#include "mojo/shell/public/cpp/application_delegate.h"
+#include "mojo/shell/public/cpp/interface_factory.h"
namespace mojo {
class ApplicationConnection;
@@ -19,7 +22,10 @@ class ApplicationConnection;
namespace mash {
namespace shell {
-class ShellApplicationDelegate : public mojo::ApplicationDelegate {
+class ShellApplicationDelegate
+ : public mojo::ApplicationDelegate,
+ public mash::shell::mojom::Shell,
+ public mojo::InterfaceFactory<mash::shell::mojom::Shell> {
public:
ShellApplicationDelegate();
~ShellApplicationDelegate() override;
@@ -30,12 +36,23 @@ class ShellApplicationDelegate : public mojo::ApplicationDelegate {
bool ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) override;
+ // mash::shell::mojom::Shell:
+ void LockScreen() override;
+ void UnlockScreen() override;
+
+ // mojo::InterfaceFactory<mash::shell::mojom::Shell>:
+ void Create(mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<mash::shell::mojom::Shell> r) override;
+
void StartWindowManager();
void StartWallpaper();
void StartShelf();
void StartBrowserDriver();
void StartQuickLaunch();
+ void StartScreenlock();
+ void StopScreenlock();
+
// Starts the application at |url|, running |restart_callback| if the
// connection to the application is closed.
void StartRestartableService(const std::string& url,
@@ -43,6 +60,7 @@ class ShellApplicationDelegate : public mojo::ApplicationDelegate {
mojo::ApplicationImpl* app_;
std::map<std::string, scoped_ptr<mojo::ApplicationConnection>> connections_;
+ mojo::WeakBindingSet<mash::shell::mojom::Shell> bindings_;
DISALLOW_COPY_AND_ASSIGN(ShellApplicationDelegate);
};
« 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