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

Side by Side Diff: ash/autoclick/mus/autoclick_application.h

Issue 2316553003: mash: Add autoclick app. (Closed)
Patch Set: MouseEvent; if etc. Created 4 years, 3 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 | « ash/autoclick/mus/DEPS ('k') | ash/autoclick/mus/autoclick_application.cc » ('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 2016 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 ASH_AUTOCLICK_MUS_AUTOCLICK_APPLICATION_H_
6 #define ASH_AUTOCLICK_MUS_AUTOCLICK_APPLICATION_H_
7
8 #include <map>
9
10 #include "ash/autoclick/common/autoclick_controller_common.h"
11 #include "ash/autoclick/common/autoclick_controller_common_delegate.h"
12 #include "ash/autoclick/mus/public/interfaces/autoclick.mojom.h"
13 #include "base/macros.h"
14 #include "mash/public/interfaces/launchable.mojom.h"
15 #include "mojo/public/cpp/bindings/binding.h"
16 #include "services/shell/public/cpp/service.h"
17
18 namespace views {
19 class AuraInit;
20 class Widget;
21 class WindowManagerConnection;
22 }
23
24 namespace ash {
25 namespace autoclick {
26
27 class AutoclickApplication
28 : public shell::Service,
29 public mash::mojom::Launchable,
30 public mojom::AutoclickController,
31 public shell::InterfaceFactory<mash::mojom::Launchable>,
32 public shell::InterfaceFactory<mojom::AutoclickController>,
33 public AutoclickControllerCommonDelegate {
34 public:
35 AutoclickApplication();
36 ~AutoclickApplication() override;
37
38 private:
39 // shell::Service:
40 void OnStart(const shell::Identity& identity) override;
41 bool OnConnect(const shell::Identity& remote_identity,
42 shell::InterfaceRegistry* registry) override;
43
44 // mojom::Launchable:
45 void Launch(uint32_t what, mash::mojom::LaunchMode how) override;
46
47 // mojom::AutoclickController:
48 void SetAutoclickDelay(uint32_t delay_in_milliseconds) override;
49
50 // shell::InterfaceFactory<mojom::Launchable>:
51 void Create(const shell::Identity& remote_identity,
52 mash::mojom::LaunchableRequest request) override;
53
54 // shell::InterfaceFactory<mojom::AutoclickController>:
55 void Create(const shell::Identity& remote_identity,
56 mojom::AutoclickControllerRequest request) override;
57
58 // AutoclickControllerCommonDelegate:
59 views::Widget* CreateAutoclickRingWidget(
60 const gfx::Point& event_location) override;
61 void UpdateAutoclickRingWidget(views::Widget* widget,
62 const gfx::Point& event_location) override;
63 void DoAutoclick(const gfx::Point& event_location,
64 const int mouse_event_flags) override;
65 void OnAutoclickCanceled() override;
66
67 mojo::Binding<mash::mojom::Launchable> launchable_binding_;
68 mojo::Binding<mojom::AutoclickController> autoclick_binding_;
69
70 std::unique_ptr<views::AuraInit> aura_init_;
71 std::unique_ptr<views::WindowManagerConnection> window_manager_connection_;
72 std::unique_ptr<AutoclickControllerCommon> autoclick_controller_common_;
73 std::unique_ptr<views::Widget> widget_;
74
75 DISALLOW_COPY_AND_ASSIGN(AutoclickApplication);
76 };
77
78 } // namespace autoclick
79 } // namespace ash
80
81 #endif // ASH_AUTOCLICK_MUS_AUTOCLICK_APPLICATION_H_
OLDNEW
« no previous file with comments | « ash/autoclick/mus/DEPS ('k') | ash/autoclick/mus/autoclick_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698