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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void SetTrailingMargin(int margin); | 67 void SetTrailingMargin(int margin); |
68 | 68 |
69 // Opens the app menu immediately during a drag-and-drop operation. | 69 // Opens the app menu immediately during a drag-and-drop operation. |
70 // Used only in testing. | 70 // Used only in testing. |
71 static bool g_open_app_immediately_for_testing; | 71 static bool g_open_app_immediately_for_testing; |
72 | 72 |
73 private: | 73 private: |
74 // views::InkDropHost: | 74 // views::InkDropHost: |
75 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; | 75 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; |
76 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; | 76 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; |
| 77 gfx::Point CalculateInkDropCenter() const override; |
77 | 78 |
78 // views::MenuButton: | 79 // views::MenuButton: |
79 const char* GetClassName() const override; | 80 const char* GetClassName() const override; |
80 scoped_ptr<views::LabelButtonBorder> CreateDefaultBorder() const override; | 81 scoped_ptr<views::LabelButtonBorder> CreateDefaultBorder() const override; |
81 gfx::Rect GetThemePaintRect() const override; | 82 gfx::Rect GetThemePaintRect() const override; |
82 bool GetDropFormats( | 83 bool GetDropFormats( |
83 int* formats, | 84 int* formats, |
84 std::set<ui::Clipboard::FormatType>* format_types) override; | 85 std::set<ui::Clipboard::FormatType>* format_types) override; |
85 bool AreDropTypesRequired() override; | 86 bool AreDropTypesRequired() override; |
86 bool CanDrop(const ui::OSExchangeData& data) override; | 87 bool CanDrop(const ui::OSExchangeData& data) override; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // a maximized state to extend to the full window width. | 125 // a maximized state to extend to the full window width. |
125 int margin_trailing_; | 126 int margin_trailing_; |
126 | 127 |
127 // Used to spawn weak pointers for delayed tasks to open the overflow menu. | 128 // Used to spawn weak pointers for delayed tasks to open the overflow menu. |
128 base::WeakPtrFactory<AppMenuButton> weak_factory_; | 129 base::WeakPtrFactory<AppMenuButton> weak_factory_; |
129 | 130 |
130 DISALLOW_COPY_AND_ASSIGN(AppMenuButton); | 131 DISALLOW_COPY_AND_ASSIGN(AppMenuButton); |
131 }; | 132 }; |
132 | 133 |
133 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ | 134 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ |
OLD | NEW |