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

Side by Side Diff: chrome/browser/ui/ash/lock_screen_action_handler.h

Issue 2848813002: Introduce ash mojo interface for lock screen action handlers (Closed)
Patch Set: . Created 3 years, 7 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
OLDNEW
(Empty)
1 // Copyright 2017 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 #ifndef CHROME_BROWSER_UI_ASH_LOCK_SCREEN_ACTION_HANDLER_H_
6 #define CHROME_BROWSER_UI_ASH_LOCK_SCREEN_ACTION_HANDLER_H_
7
8 #include "ash/public/interfaces/action_handler.mojom.h"
9 #include "base/scoped_observer.h"
10 #include "chrome/browser/chromeos/lock_screen_apps/state_controller.h"
11 #include "chrome/browser/chromeos/lock_screen_apps/state_observer.h"
12 #include "mojo/public/cpp/bindings/binding.h"
13
14 // Chrome implementation of ash action handler interface.
15 // Delegates action requests from ash to lock_sreen_apps::StateController and
16 // lock screen apps state changes from lock_screen_apps::StateController to ash.
17 class LockScreenActionHandler : public ash::mojom::ActionHandler,
18 public lock_screen_apps::StateObserver {
19 public:
20 explicit LockScreenActionHandler(
21 lock_screen_apps::StateController* state_controller);
22 ~LockScreenActionHandler() override;
23
24 // Initializes the handlers mojo bindings.
25 void Init();
26
27 // ash::mojom::ActionHandler impl:
28 void RequestHandleAction(ash::mojom::ActionHandlerAction action) override;
29
30 // lock_screen_apps::StateObserver impl:
31 void OnLockScreenAppsStateChanged(
32 lock_screen_apps::Action action,
33 lock_screen_apps::ActionState state) override;
34
35 private:
36 lock_screen_apps::StateController* lock_screen_apps_state_controller_;
37 ScopedObserver<lock_screen_apps::StateController,
38 lock_screen_apps::StateObserver>
39 observer_;
40
41 mojo::Binding<ash::mojom::ActionHandler> binding_;
42 ash::mojom::ActionHandlerStateControllerPtr action_handler_state_controller_;
43
44 DISALLOW_COPY_AND_ASSIGN(LockScreenActionHandler);
45 };
46
47 #endif // CHROME_BROWSER_UI_ASH_LOCK_SCREEN_ACTION_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698