| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_UI_VIEWS_TOOLBAR_CHEVRON_MENU_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_CHEVRON_MENU_BUTTON_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_CHEVRON_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_CHEVRON_MENU_BUTTON_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 virtual ~ChevronMenuButton(); | 23 virtual ~ChevronMenuButton(); |
| 24 | 24 |
| 25 // Closes the overflow menu (and any context menu), if it is open. | 25 // Closes the overflow menu (and any context menu), if it is open. |
| 26 void CloseMenu(); | 26 void CloseMenu(); |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 class MenuController; | 29 class MenuController; |
| 30 | 30 |
| 31 // views::MenuButton: | 31 // views::MenuButton: |
| 32 virtual scoped_ptr<views::LabelButtonBorder> CreateDefaultBorder() const | 32 virtual scoped_ptr<views::LabelButtonBorder> CreateDefaultBorder() const |
| 33 OVERRIDE; | 33 override; |
| 34 virtual bool GetDropFormats(int* formats, | 34 virtual bool GetDropFormats(int* formats, |
| 35 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; | 35 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) override; |
| 36 virtual bool AreDropTypesRequired() OVERRIDE; | 36 virtual bool AreDropTypesRequired() override; |
| 37 virtual bool CanDrop(const ui::OSExchangeData& data) OVERRIDE; | 37 virtual bool CanDrop(const ui::OSExchangeData& data) override; |
| 38 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; | 38 virtual void OnDragEntered(const ui::DropTargetEvent& event) override; |
| 39 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; | 39 virtual int OnDragUpdated(const ui::DropTargetEvent& event) override; |
| 40 virtual void OnDragExited() OVERRIDE; | 40 virtual void OnDragExited() override; |
| 41 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; | 41 virtual int OnPerformDrop(const ui::DropTargetEvent& event) override; |
| 42 | 42 |
| 43 // views::MenuButtonListener: | 43 // views::MenuButtonListener: |
| 44 virtual void OnMenuButtonClicked(View* source, const gfx::Point& point) | 44 virtual void OnMenuButtonClicked(View* source, const gfx::Point& point) |
| 45 OVERRIDE; | 45 override; |
| 46 | 46 |
| 47 // Shows the overflow menu. | 47 // Shows the overflow menu. |
| 48 void ShowOverflowMenu(bool for_drop); | 48 void ShowOverflowMenu(bool for_drop); |
| 49 | 49 |
| 50 // Called by the overflow menu when all the work is done. | 50 // Called by the overflow menu when all the work is done. |
| 51 void MenuDone(); | 51 void MenuDone(); |
| 52 | 52 |
| 53 // The owning BrowserActionsContainer. | 53 // The owning BrowserActionsContainer. |
| 54 BrowserActionsContainer* browser_actions_container_; | 54 BrowserActionsContainer* browser_actions_container_; |
| 55 | 55 |
| 56 // The overflow menu controller. | 56 // The overflow menu controller. |
| 57 scoped_ptr<MenuController> menu_controller_; | 57 scoped_ptr<MenuController> menu_controller_; |
| 58 | 58 |
| 59 base::WeakPtrFactory<ChevronMenuButton> weak_factory_; | 59 base::WeakPtrFactory<ChevronMenuButton> weak_factory_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(ChevronMenuButton); | 61 DISALLOW_COPY_AND_ASSIGN(ChevronMenuButton); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_CHEVRON_MENU_BUTTON_H_ | 64 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_CHEVRON_MENU_BUTTON_H_ |
| OLD | NEW |