| 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 CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 void UpdateIcon(); | 63 void UpdateIcon(); |
| 64 | 64 |
| 65 // Opens the app menu immediately during a drag-and-drop operation. | 65 // Opens the app menu immediately during a drag-and-drop operation. |
| 66 // Used only in testing. | 66 // Used only in testing. |
| 67 static bool g_open_app_immediately_for_testing; | 67 static bool g_open_app_immediately_for_testing; |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 // views::InkDropHost: | 70 // views::InkDropHost: |
| 71 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; | 71 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; |
| 72 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; | 72 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; |
| 73 gfx::Point CalculateInkDropCenter() const override; |
| 73 | 74 |
| 74 // views::MenuButton: | 75 // views::MenuButton: |
| 75 const char* GetClassName() const override; | 76 const char* GetClassName() const override; |
| 76 bool GetDropFormats( | 77 bool GetDropFormats( |
| 77 int* formats, | 78 int* formats, |
| 78 std::set<ui::Clipboard::FormatType>* format_types) override; | 79 std::set<ui::Clipboard::FormatType>* format_types) override; |
| 79 bool AreDropTypesRequired() override; | 80 bool AreDropTypesRequired() override; |
| 80 bool CanDrop(const ui::OSExchangeData& data) override; | 81 bool CanDrop(const ui::OSExchangeData& data) override; |
| 81 void Layout() override; | 82 void Layout() override; |
| 82 void OnDragEntered(const ui::DropTargetEvent& event) override; | 83 void OnDragEntered(const ui::DropTargetEvent& event) override; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // there. | 115 // there. |
| 115 bool* destroyed_; | 116 bool* destroyed_; |
| 116 | 117 |
| 117 // Used to spawn weak pointers for delayed tasks to open the overflow menu. | 118 // Used to spawn weak pointers for delayed tasks to open the overflow menu. |
| 118 base::WeakPtrFactory<AppMenuButton> weak_factory_; | 119 base::WeakPtrFactory<AppMenuButton> weak_factory_; |
| 119 | 120 |
| 120 DISALLOW_COPY_AND_ASSIGN(AppMenuButton); | 121 DISALLOW_COPY_AND_ASSIGN(AppMenuButton); |
| 121 }; | 122 }; |
| 122 | 123 |
| 123 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ | 124 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ |
| OLD | NEW |