| 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 // Sets |margin_trailing_| when the browser is maximized and updates layout | 63 // Sets |margin_trailing_| when the browser is maximized and updates layout |
| 64 // to make the focus rectangle centered. | 64 // to make the focus rectangle centered. |
| 65 void SetTrailingMargin(int margin); | 65 void SetTrailingMargin(int margin); |
| 66 | 66 |
| 67 // Opens the app menu immediately during a drag-and-drop operation. | 67 // Opens the app menu immediately during a drag-and-drop operation. |
| 68 // Used only in testing. | 68 // Used only in testing. |
| 69 static bool g_open_app_immediately_for_testing; | 69 static bool g_open_app_immediately_for_testing; |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 // views::MenuButton: | 72 // views::MenuButton: |
| 73 gfx::Point GetInkDropCenter() const override; | |
| 74 | |
| 75 // views::MenuButton: | |
| 76 const char* GetClassName() const override; | 73 const char* GetClassName() const override; |
| 77 scoped_ptr<views::LabelButtonBorder> CreateDefaultBorder() const override; | 74 scoped_ptr<views::LabelButtonBorder> CreateDefaultBorder() const override; |
| 78 gfx::Rect GetThemePaintRect() const override; | 75 gfx::Rect GetThemePaintRect() const override; |
| 79 bool GetDropFormats( | 76 bool GetDropFormats( |
| 80 int* formats, | 77 int* formats, |
| 81 std::set<ui::Clipboard::FormatType>* format_types) override; | 78 std::set<ui::Clipboard::FormatType>* format_types) override; |
| 82 bool AreDropTypesRequired() override; | 79 bool AreDropTypesRequired() override; |
| 83 bool CanDrop(const ui::OSExchangeData& data) override; | 80 bool CanDrop(const ui::OSExchangeData& data) override; |
| 84 void OnDragEntered(const ui::DropTargetEvent& event) override; | 81 void OnDragEntered(const ui::DropTargetEvent& event) override; |
| 85 int OnDragUpdated(const ui::DropTargetEvent& event) override; | 82 int OnDragUpdated(const ui::DropTargetEvent& event) override; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Controls the visual feedback for the button state. | 117 // Controls the visual feedback for the button state. |
| 121 scoped_ptr<views::InkDropDelegate> ink_drop_delegate_; | 118 scoped_ptr<views::InkDropDelegate> ink_drop_delegate_; |
| 122 | 119 |
| 123 // Used to spawn weak pointers for delayed tasks to open the overflow menu. | 120 // Used to spawn weak pointers for delayed tasks to open the overflow menu. |
| 124 base::WeakPtrFactory<AppMenuButton> weak_factory_; | 121 base::WeakPtrFactory<AppMenuButton> weak_factory_; |
| 125 | 122 |
| 126 DISALLOW_COPY_AND_ASSIGN(AppMenuButton); | 123 DISALLOW_COPY_AND_ASSIGN(AppMenuButton); |
| 127 }; | 124 }; |
| 128 | 125 |
| 129 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ | 126 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_BUTTON_H_ |
| OLD | NEW |