| 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_TOOLBAR_ACTION_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h" | 10 #include "chrome/browser/ui/views/toolbar/toolbar_action_view_delegate_views.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // Set a callback to be called directly before the context menu is shown. | 102 // Set a callback to be called directly before the context menu is shown. |
| 103 // The toolbar action opening the menu will be passed in. | 103 // The toolbar action opening the menu will be passed in. |
| 104 static void set_context_menu_callback_for_testing( | 104 static void set_context_menu_callback_for_testing( |
| 105 ContextMenuCallback* callback); | 105 ContextMenuCallback* callback); |
| 106 | 106 |
| 107 views::MenuItemView* menu_for_testing() { return menu_; } | 107 views::MenuItemView* menu_for_testing() { return menu_; } |
| 108 | 108 |
| 109 private: | 109 private: |
| 110 // views::MenuButton: | 110 // views::MenuButton: |
| 111 gfx::Size GetPreferredSize() const override; | 111 gfx::Size GetPreferredSize() const override; |
| 112 void OnMouseCaptureLost() override; |
| 112 bool OnMousePressed(const ui::MouseEvent& event) override; | 113 bool OnMousePressed(const ui::MouseEvent& event) override; |
| 113 void OnGestureEvent(ui::GestureEvent* event) override; | 114 void OnGestureEvent(ui::GestureEvent* event) override; |
| 114 void OnDragDone() override; | 115 void OnDragDone() override; |
| 115 void ViewHierarchyChanged( | 116 void ViewHierarchyChanged( |
| 116 const ViewHierarchyChangedDetails& details) override; | 117 const ViewHierarchyChangedDetails& details) override; |
| 117 | 118 |
| 118 // ToolbarActionViewDelegateViews: | 119 // ToolbarActionViewDelegateViews: |
| 119 views::View* GetAsView() override; | 120 views::View* GetAsView() override; |
| 120 views::FocusManager* GetFocusManagerForAccelerator() override; | 121 views::FocusManager* GetFocusManagerForAccelerator() override; |
| 121 views::View* GetReferenceViewForPopup() override; | 122 views::View* GetReferenceViewForPopup() override; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 base::TimeTicks popup_closed_time_; | 171 base::TimeTicks popup_closed_time_; |
| 171 | 172 |
| 172 scoped_ptr<views::InkDropDelegate> ink_drop_delegate_; | 173 scoped_ptr<views::InkDropDelegate> ink_drop_delegate_; |
| 173 | 174 |
| 174 base::WeakPtrFactory<ToolbarActionView> weak_factory_; | 175 base::WeakPtrFactory<ToolbarActionView> weak_factory_; |
| 175 | 176 |
| 176 DISALLOW_COPY_AND_ASSIGN(ToolbarActionView); | 177 DISALLOW_COPY_AND_ASSIGN(ToolbarActionView); |
| 177 }; | 178 }; |
| 178 | 179 |
| 179 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_ | 180 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTION_VIEW_H_ |
| OLD | NEW |