Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ash / shelf / app_list_button.h
index 2326a11..2571b71 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 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.
 
@@ -8,21 +8,22 @@
 #include "ui/views/controls/button/image_button.h"
 
 namespace ash {
-namespace internal {
-
 class ShelfButtonHost;
+class ShelfWidget;
 
 // Button used for the AppList icon on the shelf.
 class AppListButton : public views::ImageButton {
  public:
-  AppListButton(views::ButtonListener* listener, ShelfButtonHost* host);
-  virtual ~AppListButton();
+  // Bounds size (inset) required for the app icon image (in pixels).
+  static const int kImageBoundsSize;
 
-  void StartLoadingAnimation();
-  void StopLoadingAnimation();
+  AppListButton(views::ButtonListener* listener,
+                ShelfButtonHost* host,
+                ShelfWidget* shelf_widget);
+  virtual ~AppListButton();
 
  protected:
-  // views::ImageButton:
+  // views::ImageButton overrides:
   virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
   virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
   virtual void OnMouseCaptureLost() OVERRIDE;
@@ -30,15 +31,21 @@ class AppListButton : public views::ImageButton {
   virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE;
   virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
   virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
+  virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
   virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
 
+  // ui::EventHandler overrides:
+  virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
+
  private:
   ShelfButtonHost* host_;
+  // Reference to the shelf widget containing this button, owned by the
+  // root window controller.
+  ShelfWidget* shelf_widget_;
 
   DISALLOW_COPY_AND_ASSIGN(AppListButton);
 };
 
-}  // namespace internal
 }  // namespace ash
 
 #endif  // ASH_SHELF_APP_LIST_BUTTON_H_