[go: nahoru, domu]

CrOS Shelf: Refactor common shelf control logic into base class

Change-Id: If497956bc179864957dd21b8b88c8db354dd96af
Reviewed-on: https://chromium-review.googlesource.com/c/1325069
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606645}
diff --git a/ash/shelf/app_list_button.h b/ash/shelf/app_list_button.h
index 4990880..2b9df96f 100644
--- a/ash/shelf/app_list_button.h
+++ b/ash/shelf/app_list_button.h
@@ -11,6 +11,7 @@
 #include "ash/public/cpp/assistant/default_voice_interaction_observer.h"
 #include "ash/public/interfaces/voice_interaction_controller.mojom.h"
 #include "ash/session/session_observer.h"
+#include "ash/shelf/shelf_control_button.h"
 #include "ash/shell_observer.h"
 #include "base/macros.h"
 #include "mojo/public/cpp/bindings/binding.h"
@@ -29,7 +30,7 @@
 class ShelfView;
 
 // Button used for the AppList icon on the shelf.
-class ASH_EXPORT AppListButton : public views::ImageButton,
+class ASH_EXPORT AppListButton : public ShelfControlButton,
                                  public ShellObserver,
                                  public SessionObserver,
                                  public DefaultVoiceInteractionObserver {
@@ -47,10 +48,6 @@
   // views::ImageButton:
   void OnGestureEvent(ui::GestureEvent* event) override;
 
-  // Get the center point of the app list button circle used to draw its
-  // background and ink drops.
-  gfx::Point GetCenterPoint() const;
-
  protected:
   // views::ImageButton:
   bool OnMousePressed(const ui::MouseEvent& event) override;