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

Unified Diff: ash/autoclick/common/autoclick_controller_common_delegate.h

Issue 2193563002: ash: Refactor autoclick common code to ash/autoclick/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: deps Created 4 years, 4 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 | « ash/autoclick/common/autoclick_controller_common.cc ('k') | ash/autoclick/common/autoclick_ring_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/autoclick/common/autoclick_controller_common_delegate.h
diff --git a/ash/autoclick/common/autoclick_controller_common_delegate.h b/ash/autoclick/common/autoclick_controller_common_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..12035386fad72014cce95cab1a4696b74a44cec8
--- /dev/null
+++ b/ash/autoclick/common/autoclick_controller_common_delegate.h
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H
+#define ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H
+
+#include "base/macros.h"
+
+namespace views {
+class Widget;
+}
+
+namespace gfx {
+class Point;
+}
+
+namespace ash {
+
+class AutoclickControllerCommonDelegate {
+ public:
+ AutoclickControllerCommonDelegate() {}
+ virtual ~AutoclickControllerCommonDelegate() {}
+
+ // Creates a ring widget at |event_location|. AutoclickControllerCommon
+ // takes ownership of the created widget.
+ virtual std::unique_ptr<views::Widget> CreateAutoclickRingWidget(
+ const gfx::Point& event_location) = 0;
+
+ // Moves |widget| to |event_location|.
+ virtual void UpdateAutoclickRingWidget(views::Widget* widget,
+ const gfx::Point& event_location) = 0;
+
+ // Generates a click with |mouse_event_flags| at |event_location|.
+ virtual void DoAutoclick(const gfx::Point& event_location,
+ const int mouse_event_flags) = 0;
+
+ virtual void OnAutoclickCanceled() = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AutoclickControllerCommonDelegate);
+};
+
+} // namespace ash
+
+#endif // ASH_AUTOCLICK_COMMON_AUTOCLICK_CONTROLLER_COMMON_DELEGATE_H
« no previous file with comments | « ash/autoclick/common/autoclick_controller_common.cc ('k') | ash/autoclick/common/autoclick_ring_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698