| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_SHELF_SHELF_BUTTON_H_ | 5 #ifndef ASH_SHELF_SHELF_BUTTON_H_ |
| 6 #define ASH_SHELF_SHELF_BUTTON_H_ | 6 #define ASH_SHELF_SHELF_BUTTON_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "ui/gfx/shadow_value.h" | 10 #include "ui/gfx/shadow_value.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 // |state| is or'd into the current state. | 50 // |state| is or'd into the current state. |
| 51 void AddState(State state); | 51 void AddState(State state); |
| 52 void ClearState(State state); | 52 void ClearState(State state); |
| 53 int state() const { return state_; } | 53 int state() const { return state_; } |
| 54 | 54 |
| 55 // Returns the bounds of the icon. | 55 // Returns the bounds of the icon. |
| 56 gfx::Rect GetIconBounds() const; | 56 gfx::Rect GetIconBounds() const; |
| 57 | 57 |
| 58 // Called when user started dragging the shelf button. | 58 // Called when user started dragging the shelf button. |
| 59 void OnDragStarted(); | 59 void OnDragStarted(const ui::LocatedEvent* event); |
| 60 | 60 |
| 61 // Overrides to views::CustomButton: | 61 // Overrides to views::CustomButton: |
| 62 void ShowContextMenu(const gfx::Point& p, | 62 void ShowContextMenu(const gfx::Point& p, |
| 63 ui::MenuSourceType source_type) override; | 63 ui::MenuSourceType source_type) override; |
| 64 | 64 |
| 65 // View override - needed by unit test. | 65 // View override - needed by unit test. |
| 66 void OnMouseCaptureLost() override; | 66 void OnMouseCaptureLost() override; |
| 67 | 67 |
| 68 protected: | 68 protected: |
| 69 // View overrides: | 69 // View overrides: |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // If non-null the destuctor sets this to true. This is set while the menu is | 119 // If non-null the destuctor sets this to true. This is set while the menu is |
| 120 // showing and used to detect if the menu was deleted while running. | 120 // showing and used to detect if the menu was deleted while running. |
| 121 bool* destroyed_flag_; | 121 bool* destroyed_flag_; |
| 122 | 122 |
| 123 DISALLOW_COPY_AND_ASSIGN(ShelfButton); | 123 DISALLOW_COPY_AND_ASSIGN(ShelfButton); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 } // namespace ash | 126 } // namespace ash |
| 127 | 127 |
| 128 #endif // ASH_SHELF_SHELF_BUTTON_H_ | 128 #endif // ASH_SHELF_SHELF_BUTTON_H_ |
| OLD | NEW |